a,b,c比较大小,该如何处理

a,b,c比较大小#includestdlib.h//system(pause)需要#includestdio.h//printf函数需要#includeiostr

a,b,c比较大小
#include"stdlib.h"//system("pause")需要
#include<stdio.h>//printf函数需要
#include<iostream>

using std::cin;
using std::cout;
using std::endl;

int main()
{
int a,b,c,max;
cout<<endl
<<"Please input a,b,c:\n";//请输入a,b,c
cin>>a;
cin>>b;
cin>>c;
max=a;
if (max<b)
max=b;
if(max<c)
max=c;
printf("The largest number is%d\n",max);
system("pause");
return 0;
}
最大值总是a,哪位高手能解释一下,小弟不胜感激

[解决办法]
楼主的程序没错啊,
能正确计算最大值.
[解决办法]

C/C++ code
#include"stdlib.h"//system("pause")需要#include<stdio.h>//printf函数需要#include<iostream>using std::cin;using std::cout;using std::endl;int main(){int a,b,c,max;cout<<endl<<"Please input a,b,c:\n";//请输入a,b,ccin>>a;getchar();cin>>b;getchar();cin>>c;getchar();max=a;if (max<b)max=b;if(max<c)max=c;printf("The largest number is%d\n",max);system("pause");return 0;}