#include using namespace std; int main() { int A, B, C, Total, Average; cout << "please enter value A:"; cin >> A; cout << "please enter value B:"; cin >> B; cout << "please enter value C:"; cin >> C; cout << "\nInserted values: " < B) { if(A > C) cout<< "A = " << A <
#include <iostream>
using namespace std;
int main()
{
int A, B, C, Total, Average;
cout << "please enter value A:";
cin >> A;
cout << "please enter value B:";
cin >> B;
cout << "please enter value C:";
cin >> C;
cout << "\nInserted values: " <<endl;
cout << "value A = " << A <<endl;
cout << "value B = " << B <<endl;
cout << "value C = " << C <<endl<<endl;
Total = A + B + C;
Average = Total / 3;
cout<< "1. The largest value is: ";
if(A > B)
{
if(A > C)
cout<< "A = " << A <<endl;
else
cout<< "C = " << C <<endl;
}
else
{
if(B > C)
cout<< "B = " << B <<endl;
else
cout<< "C = " << C <<endl;
}
cout<<"2. Total value is: "<< Total <<endl;
cout<<"3. Average is: "<< Average <<endl;
return 0;
}
QUESTION
1. Explain what the
2. What is the output
Step by step
Solved in 3 steps with 3 images