Find Largest value

Description:

Program to display largest among two numbers using function templates. Test Case 1 Input (stdin) 4 5 2.5 3.2 a d Expected Output 5 is larger. 3.2 is larger. d has larger ASCII value. Test Case 2 Input (stdin) 6 8 3.6 2.1 h a Expected Output 8 is larger. 3.6 is larger. h has larger ASCII value.

Program :

#include <iostream>

using namespace std;

int main()

{

int a,b;

  float c,d;

  char e,f;

  cin>>a>>b>>c>>d>>e>>f;

  if(a>b)

    cout<<a<<" is larger."<<endl;

  else

    cout<<b<<" is larger."<<endl;

  if(c>d)

     cout<<c<<" is larger."<<endl;

  else

    cout<<d<<" is larger."<<endl;

  if(int (e>f))

    cout<<e<<" has larger ASCII value."<<endl;

  else

     cout<<f<<" has larger ASCII value."<<endl;

return 0;

}