/*
Developed by deepak anand.
For more programs,
visit programming-stuff-4-u.blogspot.in
*/
//This program will find which number from given two number is greater.
#include<stdio.h>
#include<conio.h>
void main()
{
int num1,num2;
clrscr();
printf("Enter the first number");
scanf("%d",&num1);
printf("Enter the second number");
scanf("%d",&num2);
printf("First number=%d \n",num1);
printf("Second number=%d",num2);
printf("\n***********************\n");
//Logic part
if(num1>num2)
printf("First number is greater");
else
printf("Second number is greater");
getch();
}
Output:
Enter the first number 10
Enter the second number 20
First number=10
Second number=20
Second number is greater
Source code: Download
No comments:
Post a Comment