C++ Program to find maximum from two numbers

visual studio

C++ actually is not such a difficult language as it is considered.I have used Visual studio. here i have write a simple comparison program to help you………

Endl is just used for go to new line

write a program to compare two numbers and find larger or maximum number

#include<iostream>

using namespace std;
void main()
{
int a, b;
int max=0;
cout<<” enter the value of a: “<<endl;
cin>>a;
cout<<endl;
cout<<” enter the valude of b: “<<endl;
cin>>b;
cout<<endl;
if(a>b)
{
max=a;
}
else
{
max=b;
}
cout<<” maximum or larger number is: “<<endl;
cout<<max;
cout<<endl;
cout<<” END OF PROGRAM “;

cout<<endl;
}

Your comment are valueable