Skip to content

Commit

Permalink
to find the greatest number out of 3 numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidddharthh committed Oct 31, 2019
1 parent 33afe7b commit 138e8b1
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions greatest_in_3_numbers.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include<stdio.h>

int main() {
int a, b, c;

printf("\n enter value of a, b & c : ");
scanf("%d %d %d", &a, &b, &c);

if ((a > b) && (a > c))
printf("\n a is greatest");

if ((b > c) && (b > a))
printf("\n b is greatest");

if ((c > a) && (c > b))
printf("\n c is greatest");

return 0 ;
}

0 comments on commit 138e8b1

Please sign in to comment.