慕粉1255299925
2017-02-17 19:32
hello.c
#include <stdio.h>
int main()
{
int x,y;
x = 10;
y = -3;
printf("x+y=%d\n", );
printf("x-y=%d\n", );
printf("x*y=%d\n", );
printf("x/y=%d\n", );
printf("x%y=%d\n", );
return 0;
}
本课程编程练习请
hello.c
#include <stdio.h>
int main()
{
int x,y;
x = 10;
y = -3;
printf("x+y=%d\n", x+y );
printf("x-y=%d\n", x-y );
printf("x*y=%d\n", x*Y );
printf("x/y=%d\n", x/y );
printf("x%y=%d\n", x%Y );
return 0;
}//上面的双引号里的%d意思是输出结果的类型属于带符号十进制整数,实际输出的值在逗号后面。
加上%d所代表的10进制变量
#include <stdio.h>
#include <stdlib.h>
int main()
{
int x,y,t;
x = 10;
y = -3;
t=x+y;
printf("x+y=%d\n",t);
t=x-y;
printf("x-y=%d\n",t);
t=x*y;
printf("x*y=%d\n",t);
t=x/y;
printf("x/y=%d\n",t);
t=x%y;
printf("x%y=%d\n",t);
system("pause");
return 0;
}
//结果C语言入门
926020 学习 · 20793 问题
相似问题