上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页
摘要: #includeint main(void){ char ch; printf("input characters:"); ch=getchar(); while(ch!='\n'){ if(ch>='A'&&ch='a'&&ch<='z') ch=ch-'a'+'A'; putchar(ch); ch=getchar(); } return 0;} 阅读全文
posted @ 2013-10-05 16:26 huangsilinlana 阅读(109) 评论(0) 推荐(0)
摘要: #includeint main(void){ char ch='w'; int a=2,b=0,c=0; float x=3.0; printf("%d",a&&b); printf("%d",a||b&&c); printf("%d",!a&&b); printf("%d",a||3+10&&2); printf("%d",!(x==2)); printf("%d",!x==2); print 阅读全文
posted @ 2013-10-05 16:17 huangsilinlana 阅读(151) 评论(0) 推荐(0)
摘要: #includeint main(void){ char ch = 'w'; int a=2,b=3,c=1,d,x=10; printf("%d",a>b==c); printf("%d",d=a>b); printf("%d",ch>'a'+1); printf("%d",d=a+b>c); printf("%d",b-1==a!=c); printf("%d\n",3<=x<=5); return 0; 阅读全文
posted @ 2013-10-05 16:04 huangsilinlana 阅读(96) 评论(0) 推荐(0)
摘要: #includeint main(void){ int i; char ch_lower,ch_upper; for(i=1;i='a' && ch_lower%c->%d\n",ch_lower,ch_upper,ch_upper%10); } return 0;} 阅读全文
posted @ 2013-10-05 15:44 huangsilinlana 阅读(135) 评论(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-04 10:25 huangsilinlana 阅读(77) 评论(0) 推荐(0)
摘要: #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 value:&q 阅读全文
posted @ 2013-10-04 09:26 huangsilinlana 阅读(97) 评论(0) 推荐(0)
摘要: #includeint x;int f( );int main(void){ int a=1; x = a; a = f(); { int b = 2; b = a + b; x = x + b; } printf("%d%d",a,x); return 0;}int f(){ int x=4; return x;} 阅读全文
posted @ 2013-10-03 22:28 huangsilinlana 阅读(75) 评论(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-03 22:16 huangsilinlana 阅读(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,d 阅读全文
posted @ 2013-10-03 21:37 huangsilinlana 阅读(125) 评论(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-03 19:27 huangsilinlana 阅读(116) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页