menu

Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Menu

  • C
  • C++
  • CCNA
  • Java

Translate

Wednesday, 9 September 2015

To check largest among two numbers without using if statement

To check largest among two numbers without using if statement

============================================================

#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
printf("Enter two numbers");
scanf("%d%d",&a,&b);
c=a>b?a:b;
printf("The largest number is %d",c);
getch();

}
 
========================

Out put
Enter two numbers
10
20
The largest number is 20

No comments:

Post a Comment