• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






琼溪

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理
上一页 1 2 3 4 5 6 7 下一页

2013年10月5日

例5-8+5-9
摘要: #includefloat cash;int main(void){ int choice; float value; void income(float number),expend(float number); cash=0; printf("Enter operate choice(0--end,1--income,2--expend):"); scanf("%d",&choice); while(choice!=0){ if(choice==1||choice==2){ printf("Enter cash ... 阅读全文
posted @ 2013-10-05 19:43 琼溪 阅读(133) 评论(0) 推荐(0)
 
例5-6+5-7
摘要: #includefloat result_real,result_imag;int main(void){ float imag1,imag2,real1,real2; void complex_prod(float real1,float imag1,float real2,float imag2); void complex_add(float real1,float imag1,float real2,float imag2); printf("Enter 1st complex number(real and imaginary):"); scanf(... 阅读全文
posted @ 2013-10-05 19:42 琼溪 阅读(117) 评论(0) 推荐(0)
 
例5-4+5-5
摘要: #include#includeint main(void){ int count,m; int prime(int m); count=0; for(m=2;mint main(void){ void pyramid(int n); pyramid(5); return 0;}void pyramid(int n){ int i,j; for(i=1;iint main(void){ void pyramid(int n); pyramid(5); return 0;}void pyramid(int n){ in... 阅读全文
posted @ 2013-10-05 16:46 琼溪 阅读(107) 评论(0) 推荐(0)
 

2013年10月4日

例5-1+5-3
摘要: #includeint main(void){ double height,radius,volume; double cylinder(double r,double h); printf("Enter radius and height:"); scanf("%lf%lf",&radius,&height); volume=cylinder(radius,height); printf("Volume=%.3f\n",volume); return 0;}double cylinder(double r,doubl 阅读全文
posted @ 2013-10-04 20:43 琼溪 阅读(143) 评论(0) 推荐(0)
 
例4-12
摘要: #includeint main(void){ int child,men,women; for(men=0;menint main(void){ int child,women,men; for(men=0;men<=15;men++) for(women=0;women<=22;women++){ child=45-women-men; if(men*3+women*2+child*0.5==45) printf("men=%d,women=%d,child=%d\n",men,... 阅读全文
posted @ 2013-10-04 20:19 琼溪 阅读(88) 评论(0) 推荐(0)
 
例4-11
摘要: #includeint main(void){ int i,x1,x2,x; x1=1; x2=1; printf("%6d%6d",x1,x2); for(i=1;i<=8;i++){ x=x1+x2; printf("%6d",x); x1=x2; x2=x; } printf("\n"); return 0;} 阅读全文
posted @ 2013-10-04 20:12 琼溪 阅读(99) 评论(0) 推荐(0)
 
例4-9+4-10
摘要: #includeint main(void){ int x; printf("Enter x:"); scanf("%d",&x); while(x!=0){ printf("%d",x%10); x=x/10; } return 0;}#include#includeint main(void){ int count,i,m,n; count=0; for(m=2;mn){ printf("%6d",m); count++; if(count%1... 阅读全文
posted @ 2013-10-04 20:04 琼溪 阅读(120) 评论(0) 推荐(0)
 
例4-8
摘要: #includeint main(void){ int i,mark,max,n; printf("Enter n:"); scanf("%d",&n); printf("Enter%d marks:",n); scanf("%d",&mark); max=mark; for(i=1;iint main(void){ int mark,max; printf("Enter marks:"); scanf("%d",&mark); max=mark; w 阅读全文
posted @ 2013-10-04 19:34 琼溪 阅读(93) 评论(0) 推荐(0)
 
例4-6+4-7
摘要: #includedouble fact(int n);int main(void){ int i; double sum; sum=0; for(i=1;iint main(void){ int i,j; double item,sum; sum=0; for(i=1;i<=100;i++){ item=1; for(j=1;j<=i;j++) item=item*j; sum=sum+item; } printf("1!+2!+...+100!=%e\n",sum);r... 阅读全文
posted @ 2013-10-04 19:19 琼溪 阅读(131) 评论(0) 推荐(0)
 
例4-5
摘要: #includeint main(void){ int mynumber=38; int count=0,yournumber; for(count=1;countmynumber) printf("Sorry!your number is bigger than my number!\n"); else printf("Sorry!your number is smaller than my number!\n"); } printf("Game is over!\n"); ... 阅读全文
posted @ 2013-10-04 19:11 琼溪 阅读(112) 评论(0) 推荐(0)
 
上一页 1 2 3 4 5 6 7 下一页