只有三个数,用if分支就可以了:
//#include "stdafx.h"//If the vc++6.0, with this line.
#include "stdio.h"
int main(void){
int a,b,c,max;
printf("Input 3 integers...\n");
scanf("%d%d%d",&a,&b,&c);
if(a>=b && a>=c)
max=a;
else if(b>=a && b>=c)
max=b;
else if(c>=a && c>=b)
max=c;
printf("The MAX is %d\n",max);
return 0;
}