Write a C++ program that prompts the user to input three integer values and find the greatest value of the three values.

Example:
Enter 3 integer vales separated by space: 10 15 20
The greatest value is: 20

Code for coying
#include <iostream>
using namespace std;
int main()
{
int a,b,c;
cout << "Enter 3 integer vales separated by space: ";
cin >>a >>b >>c;
if ((a>=b) && (a>=c))
cout<<"The greatest value is:"<<a;
else if ((b>=a) && (b>=c))
cout<<"The greatest value is:"<<b;
else
cout<<"The greatest value is:"<<c;
return 0;
}

Computer Science & Information Technology

You might also like to view...

When a paragraph style is applied, the character styles in the paragraph are removed

Indicate whether the statement is true or false

Computer Science & Information Technology

Which of the following choices is a prerequisite for good configuration management?

A. Risk analysis B. Baselines C. Information management D. Benchmarks

Computer Science & Information Technology