会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
贺占录
博客园
首页
新随笔
联系
订阅
管理
2019年6月25日
11次作业
摘要: 1、实验要求:建立一个通信录,通信录的结构体记录包括:姓名、生日、电话号码;其中生日又包括三项:年、月、日。编写程序,定义一个嵌套的结构类型,输入n(n<10)个联系人的信息,再按他们的年龄大小的顺序依次输出其信息。 #include<stdio.h>struct birthday {int yea
阅读全文
posted @ 2019-06-25 17:31 贺占录
阅读(128)
评论(0)
推荐(0)
2019年6月19日
指针实验
摘要: 1.实数拆分 #include<stdio.h>void splitfloat (float x,int *intpart,float * fracpart);int main(void){float i; int m; float n; printf("输入一个实数\n");scanf("%f",
阅读全文
posted @ 2019-06-19 21:43 贺占录
阅读(121)
评论(0)
推荐(0)
2019年6月11日
第九次作业
摘要: 杨辉三角 #include"stdio.h"int main(){int a[100][100],i,j,x,n;printf("请输入要打印的行数n:");scanf("%d",&n);for(i=0;i<n;i++)for(j=0;j<=i/2;j++){if(j==0)a[i][j]=1;el
阅读全文
posted @ 2019-06-11 22:44 贺占录
阅读(82)
评论(1)
推荐(0)
2019年6月10日
c语言第八次作业
摘要: 1. /*选择法排序。输入一个正整数n(1<n<=10),再输入n个整数,将他们从大到小排序后输出。试编写相应程序。*/#include<stdio.h>int main (void){int i,index,k,n,t;int a[10];printf("请输入要输入数据的个数n:");scanf
阅读全文
posted @ 2019-06-10 20:31 贺占录
阅读(229)
评论(1)
推荐(0)
2019年5月28日
第七次作业
摘要: /*3.使用函数输出指定范围内的完数:输人两个正整数m和n (1≤m, n≤1 00020输出m ~n之间的所有完数,完数就是因子和与它本身相等的数。要求定义并调用函数表达式是 factorsum ( number),它的功能是返回number的因子和。例如factorsum (12) 的返回值是16 (1+2+3+4+6)。 试编写相应程序。*/ #include #include in...
阅读全文
posted @ 2019-05-28 20:43 贺占录
阅读(171)
评论(0)
推荐(0)
2019年5月7日
作业六
摘要: #include<stdio.h>#include<math.h>int prime(int m);int main(void){int m,n,count,sum; printf("Enter m,n,m>=1,n<=500\n"); scanf("%d%d",&m,&n);sum=0;count
阅读全文
posted @ 2019-05-07 22:46 贺占录
阅读(98)
评论(1)
推荐(0)
2019年4月16日
第五次作业
摘要: #include int main() {int m,n,i,X,Y; printf("输入两个数字m,n\n"); scanf("%d%d",&m,&n); if(m<=1000&&n<=1000) for(i=1;i<=m&&i<=n;i++){ if(m%i==0&&n%i==0) X=i; Y=m*n/i; printf("m=%d,n=%d",m,n); prin...
阅读全文
posted @ 2019-04-16 20:43 贺占录
阅读(81)
评论(0)
推荐(0)
2019年4月10日
第四次作业
摘要: 1.车价:#include<stdio.h>include<math.h>int main(void){int min,N;double x,y,sum;printf("Enter min,x:\n");scanf("%d%lf",&min,&x); if(x<=3){ y=10; }else if
阅读全文
posted @ 2019-04-10 19:36 贺占录
阅读(84)
评论(1)
推荐(0)
2019年3月30日
第三次作业
摘要: 求解一元二次方程的解 1.无解 2.无意义 3.两个解 4.一个解
阅读全文
posted @ 2019-03-30 19:24 贺占录
阅读(81)
评论(0)
推荐(0)
2019年3月20日
第二次作业
摘要:
阅读全文
posted @ 2019-03-20 20:40 贺占录
阅读(71)
评论(0)
推荐(0)
下一页
公告