forked from seeditsolution/cprogram
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request seeditsolution#257 from soni-111/patch-1
Create greatest number 1
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include<stdio.h> | ||
#include<conio.h> | ||
void main() | ||
{ | ||
|
||
int n1,n2,sum; | ||
clrscr(); | ||
|
||
printf("\nEnter 1st number : "); | ||
scanf("%d",&n1); | ||
|
||
printf("\nEnter 2nd number : "); | ||
scanf("%d",&n2); | ||
|
||
if(n1 > n2) | ||
printf("\n1st number is greatest."); | ||
else | ||
printf("\n2nd number is greatest."); | ||
|
||
getch(); | ||
} | ||
|
||
Output : | ||
|
||
Enter 1st number : 115 | ||
Enter 2nd number : 228 | ||
2nd number is greatest. |