课程
/后端开发
/C
/C语言入门
学习算术运算符后面的练习题,其中的取余运算 printf("x%%y=%d\n",1);后面虽然可以被识别运算成功,可是后面(下一节那)会提示没有检测到x%y,这是不是那里有点不对?
2019-03-12
源自:C语言入门 3-2
正在回答
printf("x%%y=%d\n",x%y);
%d差不多就是读取的意思
举报
C语言入门视频教程,带你进入编程世界的必修课-C语言
1 回答 printf("x%%y=%d\n",x%y );与 printf("x%y=%d\n",x%y );
2 回答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;
2 回答#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;
6 回答#include <stdio.h> int main() { int a,s,d,f,g; a=x+y; s=x-y; d=x*y;f=x/y;g=x%y;printf("x+y=%d\n", a);printf("x-y=%d\n", s);printf("x*y=%d\n", d ); printf("x/y=%d\n", f);printf("x%y=%d\n", g);return 0;}
4 回答printf("x%%y=%d\n",x%y);