摘要: (5) #include<stdio.h>struct friends{ /*姓名*/ char name[10]; /*电话号码*/ int phone; /*生日*/ int birthday;};struct birthday{ int year; int month; int day;}; 阅读全文
posted @ 2019-06-25 18:02 拉恒 阅读(148) 评论(0) 推荐(0) 编辑
摘要: (1) #include<stdio.h>#include<string.h>int main(void){ int i,j; char a[5][20], t[20]; printf ("请输入5个字符串:\n"); for (i = 0; i < 5; i++) scanf("%s",a[i]) 阅读全文
posted @ 2019-06-19 21:19 拉恒 阅读(112) 评论(0) 推荐(0) 编辑
摘要: #include"stdio.h"int main(void){int a[100][100],i,j,n;scanf("%d",&n);for(i=0;i<n;i++)for(j=0;j<=i/2;j++){if(j==0)a[i][j]=1;elsea[i][j]=a[i-1][j-1]+a[i 阅读全文
posted @ 2019-06-11 22:56 拉恒 阅读(100) 评论(1) 推荐(0) 编辑
摘要: (1) #include<stdio.h>int main (void){int i,index,k,n,t;int a[10];printf("输入数据的个数n:");scanf("%d",&n);printf("输入数据%d;",n);for(i=0;i<n;i++)scanf("%d",&a[ 阅读全文
posted @ 2019-06-10 22:14 拉恒 阅读(63) 评论(0) 推荐(0) 编辑
摘要: /*3.使用函数输出指定范围内的完数:输人两个正整数m和n (1≤m, n≤1 00020输出m ~n之间的所有完数,完数就是因子和与它本身相等的数。要求定义并调用函数表达式是 factorsum ( number),它的功能是返回number的因子和。例如factorsum (12) 的返回值是1 阅读全文
posted @ 2019-05-28 18:16 拉恒 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 心得:这次作业在完成过程中出现了一些问题,最后还是查看课本完成了这次作业,所以自己在编写程序有很大问题,以后会多加努力。 阅读全文
posted @ 2019-05-08 21:45 拉恒 阅读(114) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>int main (void){ int m,n,c,d; printf("Enter m n:"); scanf("%d%d",&m,&n); printf("m<=1000 && n<=1000\n"); c=m*n; while(n!=0){ d=m%n; m 阅读全文
posted @ 2019-04-16 21:10 拉恒 阅读(63) 评论(0) 推荐(0) 编辑
摘要: #include"stdio.h"#include"math.h"int main(void){ double a,b,z; printf("Enter a: b:\n"); scanf("%lf%lf",&a,&b); if(a<=3&&b<5){ z=10;} else if(a<=3&&b>= 阅读全文
posted @ 2019-04-10 22:02 拉恒 阅读(124) 评论(1) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-03-31 22:33 拉恒 阅读(79) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-03-19 22:24 拉恒 阅读(135) 评论(0) 推荐(0) 编辑