Take 3 integers from user and find the greatest

  #include<iostream>

using namespace std;

int main(){

int a,b,c;

cout<<"Enter 3 integers:";

cin>>a>>b>>c;

if(a>b && a>c)

cout<< a<<" is greatest";

if(b>a && b>c)

cout<<b<<" is greatest";

else

cout<<c<<" is greatest";

return 0;}



0 Comments had been done yet:

Post a Comment