第一个c++代码,希望可以看到自己的进步
#include<iostream>
using namespace std;
int main()
{
double a=0, b=0, c=0;
cout << "请输入三只小猪的体重:\n";
cin >> a >> b >> c;
if (a > b)
{
if (a > c)
cout << "小猪a最重\n";
else
cout << "小猪c最重\n";
}
else
{
if (b > c)
cout << "小猪b最重\n";
else
cout << "小猪c最重\n";
}
system("pause");
return 0;
}