#includevoid main(){ int x,y,z; printf("문용남 24호"); printf("Input x:"); scanf("%d",&x); printf("Input y:"); scanf("%d",&y); printf("Input z:"); scanf("%d",&z); printf("(x+y)*(x+z)/(y%z)=%d",(x+y)*(x+z)/(y%z)); ret
来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/25 00:52:46
#includevoid main(){ int x,y,z; printf("문용남 24호"); printf("Input x:"); scanf("%d",&x); printf("Input y:"); scanf("%d",&y); printf("Input z:"); scanf("%d",&z); printf("(x+y)*(x+z)/(y%z)=%d",(x+y)*(x+z)/(y%z)); ret
#include
void main()
{
int x,y,z;
printf("문용남 24호");
printf("Input x:");
scanf("%d",&x);
printf("Input y:");
scanf("%d",&y);
printf("Input z:");
scanf("%d",&z);
printf("(x+y)*(x+z)/(y%z)=%d",(x+y)*(x+z)/(y%z));
return 0;
}
整个就是这样,就是编译的话就出24_1011_01.c:14:3: 警告: 格式字符串中出现无效的类型转换字符‘)’ [-Wformat]
问题是(y%z)是什么意思?
请大家自觉点.不要发无聊的东西.
#includevoid main(){ int x,y,z; printf("문용남 24호"); printf("Input x:"); scanf("%d",&x); printf("Input y:"); scanf("%d",&y); printf("Input z:"); scanf("%d",&z); printf("(x+y)*(x+z)/(y%z)=%d",(x+y)*(x+z)/(y%z)); ret
应对%进行转义