#include<iostream>
using namespace std;
int main()
{
//1.创建三只小猪的体重变量
int weight1 = 0;
int weight2 = 0;
int weight3 = 0;
//2.让用户输入三只小猪变量
cout << "请输入第一只小猪的体重" << endl;
cin >> weight1;
cout << "请输入第一只小猪的体重" << endl;
cin >> weight2;
cout << "请输入第一只小猪的体重" << endl;
cin >> weight3;
//3.比较
if (weight1 > weight2)
{
if (weight1 > weight3) {
cout << "小猪1最重" << endl;
}
else {
cout << "小猪3最重" << endl;
}
}
else {
if (weight2 > weight3)
{
cout << "小猪2最重" << endl;
}
else {
cout << "小猪3最重" << endl;
}
}