11月17日
2016-11-17 / C/C++ / 1789 次围观 / 0 次吐槽 /#include<stdio.h> #include<stdlib.h> #include<time.h> int main(){ int n1,n2,answer; srand(time(NULL)); n1=0+rand()%100; n2=0+rand()%100; printf("%d+%d=",n1,n2); scanf("%d",&answer); printf("user:%d+%d=%d\n",n1,n2,answer); printf("system:%d+%d=%d\n",n1,n2,n1+n2); getch(); } #include<stdio.h> int main(){ char a; a=getchar(); a=a+32; putchar(a); getch(); } #include<stdio.h> #include<math.h> int main(){ float a,b,c,area,s; scanf("%f,%f,%f",&a,&b,&c); s=(1.0/2.0)*(a+b+c); area=sqrt(s*(s-a)*(s-b)*(s-c)); printf("%f",area); getch(); } #include<stdio.h> int main(){ float a,b,c; printf("Enter 3 real numbers:"); scanf("%f,%f,%f",&a,&b,&c); printf("%f,%f,%f",a,b,c); printf("%f",a+b+c); getch(); } #include<stdio.h> #define i "\t************************************************************" int main(){ printf("%s\n\n\n",i); printf("\t\t\t1--------add(+)\n"); printf("\t\t\t2--------sub(-)\n"); printf("\t\t\t3--------mul(*)\n"); printf("\t\t\t4--------div(/)\n\n\n"); printf("%s\n\n\n",i); getch(); }
- 上一篇:GD库处理图片文字水印/图片水印/图片压缩
- 下一篇:PCB_触摸延时开关
Powered By Cheug's Blog
Copyright Cheug Rights Reserved.