#include<iostream>
using namespace std;
int main()
{
//三只小猪称体重 ,看看哪个小猪比较重
//1、创建三只小猪的体重变量
int sum1 = 0;
int sum2 = 0;
int sum3 = 0;
cout << "请输入小猪A的重量" << endl;
cin >> sum1;
cout << "请输入小猪B的重量" << endl;
cin >> sum2;
cout <<"请输入小猪c的体重" << endl;
cin >> sum3;
cout << "小猪A的体重为:" << sum1 << endl;
cout << "小猪B的体重为:" << sum2 << endl;
cout << "小猪C的体重为:" << sum3 << endl;
if (sum1>sum2) {
if (sum1 > sum3) {
cout << "小猪a最重" << endl;
}
else {
cout << "小猪c最重" << endl;
}
}
else {
if (sum2 > sum3) {
cout << "小猪b最重" << endl;
}
else
{
cout << "小猪c最重" << endl;
}
}
system("pause");
return 0;
}