Write a program in C++ to enter the two numbers and display the larger number
Answers
Answered by
6
Answer:
In this program we are going to find largest number out of two number provided by the user using switch case statement.
Program :
#include<iostream.h>
#include<conio.h>
void main()
{
int a,b;
clrscr();
cout<<"\nEnter a and b:";
cin>>a>>b;
switch(a>b)
{
case 0:
cout<<b<<" is greater";
break;
case 1:
cout<<a<<" is greater";
break;
default:
cout<<"Some error";
}
getch();
}
PLZ MARK AS BRIANLIEST,FLW ME AND THX FOR THE SUPERB QUESTION
Answered by
0
Answer:
a program in C++ to enter the two numbers and display the larger number
Similar questions