menu search
person
Write a program in C++, to find max of two numbers using if else control structure.
thumb_up_alt 0 like thumb_down_alt 0 dislike
6 views

1 Answer

 
verified
#include<iostream>
using namespace std;
int main()
{
    int num1, num2, max_no;
    cout<<"Enter the Two Numbers: ";
    cin>>num1>>num2;
    if(num1>num2)
        max_no = num1;
    else
        max_no = num2;
    cout<<"\nMaximum of two nos is = "<<max_no;
    cout<<endl;
    return 0;
}

output::
image
thumb_up_alt 0 like thumb_down_alt 0 dislike
...