Created
December 15, 2014 13:27
-
-
Save scratchyourbrain/5e2bb1307f53990117ab to your computer and use it in GitHub Desktop.
C Program to Find the Largest Number Among Three Numbers
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
#include <stdio.h> | |
int main() | |
{ | |
float a, b, c; | |
printf("Enter three numbers: "); | |
scanf("%f %f %f", &a, &b, &c); | |
if(a>=b && a>=c) | |
printf("Largest number = %.2f", a); | |
else if(b>=a && b>=c) | |
printf("Largest number = %.2f", b); | |
else | |
printf("Largest number = %.2f", c); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment