2013年10月6日

摘要: #includeint main(void){ int count[9]; int i,response; for(i=1;i8) printf("this is bad response:%d\n",resonse); else count[response]++;} printf("result:\n"); for(i=1;i<=8;i++) printf("%4d%4d\n",i,count[i]); return 0;} 阅读全文
posted @ 2013-10-06 17:48 图图爱小美 阅读(142) 评论(0) 推荐(0) 编辑
 
摘要: 阅读全文
posted @ 2013-10-06 17:44 图图爱小美 阅读(96) 评论(0) 推荐(0) 编辑
 
摘要: 阅读全文
posted @ 2013-10-06 17:44 图图爱小美 阅读(61) 评论(0) 推荐(0) 编辑
 
摘要: 阅读全文
posted @ 2013-10-06 17:38 图图爱小美 阅读(64) 评论(0) 推荐(0) 编辑
 
摘要: 阅读全文
posted @ 2013-10-06 17:36 图图爱小美 阅读(62) 评论(0) 推荐(0) 编辑
 
摘要: #includedouble fact_s(int n);int main(void){ int i,n; printf("Input n:"); scanf("%d",&n); for(i=1;i<=n;i++) printf("%3d!=%.0f\n",i,fact_s(i)); return 0;}double fact_s(int n){ static double f=1; f=f*n; return(f);} 阅读全文
posted @ 2013-10-06 17:28 图图爱小美 阅读(118) 评论(0) 推荐(0) 编辑
 
摘要: #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-06 17:27 图图爱小美 阅读(167) 评论(0) 推荐(0) 编辑
 
摘要: int event(int n){ if(n%2==0) return 1; else return 0;} 阅读全文
posted @ 2013-10-06 17:27 图图爱小美 阅读(85) 评论(0) 推荐(0) 编辑
 
摘要: #includeint main(void){ void pyramid(int n); pyramid(5); return 0;}void pyramid(int n){ int i,j; for(i=1;i<=n;i++){ for(j=1;j<=n-i;j++) printf(""); for(j=1;j<=i;j++) printf("%d",i); putchar('\n'); }} 阅读全文
posted @ 2013-10-06 17:26 图图爱小美 阅读(122) 评论(0) 推荐(0) 编辑
 
摘要: #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,doub 阅读全文
posted @ 2013-10-06 17:25 图图爱小美 阅读(87) 评论(0) 推荐(0) 编辑