Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

modifty this program // Bradley Bush #include using namespace std; int main() { int num1, num2, num3, smallest, largest; cout < < Input three different

modifty this program

// Bradley Bush

#include

using namespace std;

int main()

{

int num1, num2, num3, smallest, largest;

cout << "Input three different integers: ";

cin >> num1 >> num2 >> num3; // input

largest = num1;

if ( num2 > largest )

largest = num2;

if ( num3 > largest )

largest = num3;

smallest = num1;

if ( num2 < smallest )

smallest = num2;

if ( num3 < smallest )

smallest = num3;

cout << "Sum is " << num1 + num2 + num3

<< " Average is " << (num1 + num2 + num3) / 3

<< " Product is " << num1 * num2 * num3

<< " Smallest is " << smallest

<< " Largest is " << largest << endl;

return 0;

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Michael V. Mannino

4th Edition

0615231047, 978-0615231044

More Books

Students also viewed these Databases questions