最赞回答 / 慕函数2426416
#include <stdio.h>void printLine();static void say(){ printLine(); printf("I love imooc\n"); printf("good good study!\n"); printf("day day up!\n"); printLine();}都需要调用一下,不让后面的函数不知道怎么执行
2020-09-02
最新的正确写法应该是要加INT,因为要取整。才能显示
#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",(int)x%y);
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",(int)x%y);
return 0;
}