在 C 语言中,你可以使用 if
语句来找到三个数中的最大数。
例如,假设你想要找到三个数 a
、b
和 c
中的最大数。你可以这样写:
if (a > b) {
if (a > c) {
printf("%d is the largest number.\n", a);
} else {
printf("%d is the largest number.\n", c);
}
} else {
if (b > c) {
printf("%d is the largest number.\n", b);
} else {