WAP C++ to find out the langest among three no. input by the user.

#include <iostream>

using namespace std;

int main()
{
  int a,b,c;
  cout<<"enter the value of AB and C";
  cin>>a>>b>>c;
  if(a>b){
      if(a>c)
      cout<<"A is the greater"<<a;
      else 
       cout<<"c is the greater"<<c;
  }
  else if(b>c){
      cout<<"b is the greater"<<b;
  }
  else{
      cout<<"c is the greater"<<c;
  }
    return 0;
}

Output:-

enter the value of AB and C1

3

2

b is the greater3