【发布时间】:2020-10-04 16:06:15
【问题描述】:
我必须编写一个比较 3 个整数的程序。我不明白为什么我不能将变量 a 分配给 min 或 max 变量。
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a, b, c, max, notmax;
printf("enter first integer\n");
scanf("%d", &a);
printf("enter second integer\n");
scanf("%d", &b);
printf("enter third integer\n");
scanf("%d", &c);
a > b ? a = max : a = notmax ;
return 0;
}
【问题讨论】:
-
请提供完整的错误输出。