Tuesday, 16 June 2015

C Program to find greatest of two numbers

WAP for greatest among two numbers.
Program:
#include<stdio.h>
#include<conio.h>

int main()
{
 int a,b,c;    //Declaring Variable.


 printf("\n Enter two Numbers: ");  //For printing
 scanf("%d %d",&a,&b);    //For Input.

 c=(a>b)?a:b;

 printf("\n The Greatest number is : %d",c);  //For printing

 getch();  //Getting a character or waiting for key press.
 return 0;

}


Output:


Video Explanation
Sorry Guys Explanation of this tutorial will be posted later this month.

No comments:

Post a Comment