发布时间:2014-11-24 15:59:54
(1)整数的加法:#include int main(){ int a,b,sum; scanf("%d %d",&a,&b); sum=a+b; printf("sum is %d\n",sum); return 0;}如图:(2)整数的减法:#include int main(){ int a,b,subtract; scanf("%d %d",&a,&b); subtract=a-b;.........【阅读全文】
发布时间:2014-11-24 12:02:33
/*NAME: TESTAUTHOR: DDDDDDATE : 2014-11-24MODIFY: 2014-11-24 10:23*/#include int main(){ int a,b,c; scanf("%d",&a); //从键盘获取一个整数,a =输入的整数 scanf("%d",&b); //从键盘获取一个整数, b=输入的整数.........【阅读全文】
发布时间:2014-11-24 11:48:54
/*NAME: TESTAUTHOR: DDDDDDATE : 2014-11-24MODIFY: 2014-11-24 10:23*/#include int main(){ int a,b,c; //从键盘输入3个整数,每输入一个按空格键代表确定,接下来就可以输入第二个 scanf("%d", &a); //从键盘中获取一个整数,&nb.........【阅读全文】
发布时间:2014-11-24 11:42:02
/*NAME: TESTAUTHOR: DDDDDDATE : 2014-11-24MODIFY: 2014-11-24 10:23*/#include int main(){ char a,b,c; //同时定义多个字符变量,变量的名字之间用逗号隔开 a = 100; //给变量a赋值,100是个整.........【阅读全文】
发布时间:2014-11-24 11:11:45
/*NAME: TESTAUTHOR: DDDDDDATE : 2014-11-24MODIFY: 2014-11-24 10:23*/#include int main(){ int a,b,c; a = 25; //十进制 b = 025; //以0开头的是八进制 c = 0x25; //以0x开头的是十六进制 &n.........【阅读全文】