Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save scratchyourbrain/5e2bb1307f53990117ab to your computer and use it in GitHub Desktop.
Save scratchyourbrain/5e2bb1307f53990117ab to your computer and use it in GitHub Desktop.
C Program to Find the Largest Number Among Three Numbers
#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