上一页 1 ··· 4 5 6 7 8 9 下一页
  2019年12月16日
摘要: #include<stdio.h>void main(){ int a, area; scanf("%d",&a); //等待用户从键盘输入一个整数// area=a*a; printf("The area is %d\n",area); //将变量area的值输出到屏幕上去//} 阅读全文
posted @ 2019-12-16 19:19 张德明 阅读(842) 评论(0) 推荐(0)
摘要: #include<stdio.h>void main(){ int a, area; a=3; area=a*a; printf("The area is %d\n",area);} 阅读全文
posted @ 2019-12-16 19:12 张德明 阅读(2204) 评论(0) 推荐(0)
摘要: #include<stdio.h>void main(){ int i=2; float j=3.14; printf("i=%f,j=%d\n",(float)i,(int)j);} 阅读全文
posted @ 2019-12-16 19:03 张德明 阅读(109) 评论(0) 推荐(0)
摘要: #include<stdio.h>void main(){ printf("Type int has a size of %u byte,",sizeof(int)); printf("Typelong has a size of %u byte,",sizeof(long));} 阅读全文
posted @ 2019-12-16 18:56 张德明 阅读(304) 评论(0) 推荐(0)
  2019年12月15日
摘要: #include<stdio.h>void main(){ char ch; //声明一个字符变量ch// scanf("%c",&ch); //通过键盘输入一个字符// ch=(ch>='A'&&ch<='Z')?(ch+32):ch; //进行条件表达式运算后将其值赋予变量ch// printf 阅读全文
posted @ 2019-12-15 23:02 张德明 阅读(479) 评论(0) 推荐(0)
摘要: #include<stdio.h>void main(){ int a,b,c; //声明3个整型变量a、b、c// a=b=c=1; //为3个变量均赋值为1// ++a&&++b||--c; //进行逻辑运算// printf("%d,%d,%d\n",a,b,c); //通过终端设备输出变量a 阅读全文
posted @ 2019-12-15 22:46 张德明 阅读(414) 评论(0) 推荐(0)
摘要: #include<stdio.h>void main(){ int a=7,b=8,c=9,m; //声明4个整型变量a、b、c、m,并为前三个变量初始化赋值// char n='A'; //声明一个字符型变量n,并为n初始化赋值为‘A’// m=a>b; //将关系表达式a>b的值赋予变量m// 阅读全文
posted @ 2019-12-15 22:36 张德明 阅读(267) 评论(0) 推荐(0)
摘要: #include<stdio.h>void main(){ int x=5,y,z; //声明3个整型变量x、y、z,并对变量x进行初始化// y=x++; //将变量x原来的值5赋予变量y后变量x的值加1// printf("x=%d,y=%d\n",x,y); //通过终端设备输出变量x、y的值 阅读全文
posted @ 2019-12-15 22:14 张德明 阅读(286) 评论(0) 推荐(0)
摘要: #include<stdio.h>void main(){ int m,n; //定义两个整型变量m、n// m=2; //将数值2赋予变量m// n=m; //将变量m的值赋予变量// printf("n=%d \n",n); //通过终端设备输出变量n的值//} 阅读全文
posted @ 2019-12-15 21:56 张德明 阅读(608) 评论(0) 推荐(0)
摘要: #include<stdio.h>void main(){ int m; m=2; m+=m-=m*m; printf("m=%d \n",m);} 阅读全文
posted @ 2019-12-15 21:48 张德明 阅读(148) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 下一页