写详细些
如上
写详细些
如上
#include "stdio.h"
void main(void)
{
int a, b, c;
int m;
printf("input a, b, c: ");
scanf("%d%d%d", &a, &b, &c);
m = a > b ? a : b;
m = m > c ? m : c;
printf("Max: %d\n", m);
}
if版:
#include "stdio.h"
void main(void)
{
int a, b, c;
int m;
printf("input a, b, c: ");
scanf("%d%d%d", &a, &b, &c);
if (a > b)
{
m = a;
}
else
{
m = b;
}
if (c > m)
{
m = c;
}
printf("Max: %d\n", m);
}