柠檬9506
2016-07-05 11:29
#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;
直接填结果就可以了
#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;
}
运行结果
x+y=7
x-y=13
x*y=-30
x/y=-3
x%y=1
你这不是还是题目?根本没有做呀
#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;
可输出所有+、-、*、/、%的结果。
C语言入门
926207 学习 · 20797 问题
相似问题