摘要: 阅读全文
posted @ 2013-10-06 13:39 吕鼎鼎19950427 阅读(103) 评论(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",3<=x<=5); return 0;} 阅读全文
posted @ 2013-10-06 13:31 吕鼎鼎19950427 阅读(108) 评论(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-06 13:27 吕鼎鼎19950427 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2013-10-06 13:21 吕鼎鼎19950427 阅读(105) 评论(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 ... 阅读全文
posted @ 2013-10-06 13:02 吕鼎鼎19950427 阅读(115) 评论(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-06 12:45 吕鼎鼎19950427 阅读(87) 评论(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 ang imaginary):"); scanf("% 阅读全文
posted @ 2013-10-06 12:43 吕鼎鼎19950427 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2013-10-06 12:14 吕鼎鼎19950427 阅读(87) 评论(0) 推荐(0) 编辑
摘要: #include#includeint main(void){ int count,m; int prime(int m); count=0; for(m=2;m<=100;m++){ if(prime(m)!=0){ printf("%6d",m); count++; if(count%10==0) printf("\n"); } } printf("\n");}int prime(int m){ int i,n; if(m==1)return 0;... 阅读全文
posted @ 2013-10-06 11:40 吕鼎鼎19950427 阅读(133) 评论(0) 推荐(0) 编辑
摘要: #include#includeint main(void){ double e,pi; double funpi(double e); printf("Enter e:"); scanf("%lf",&e); pi=funpi(e); printf("pi=%f\n",pi); return 0;}double funpi(double e){ int denominator,flag; double item,sum; flag=1; denominator=1; item=1.0; sum=0; whil... 阅读全文
posted @ 2013-10-06 11:34 吕鼎鼎19950427 阅读(127) 评论(0) 推荐(0) 编辑