Skip to content

Instantly share code, notes, and snippets.

@shivdhwaj
Last active July 10, 2019 12:59
Show Gist options
  • Save shivdhwaj/053b4e5dfed8293e798d82cd9e713494 to your computer and use it in GitHub Desktop.
Save shivdhwaj/053b4e5dfed8293e798d82cd9e713494 to your computer and use it in GitHub Desktop.
The code in C Language to calculate the greate of three numbers.
#include <stdio.h>
int main()
{
int fNum, sNum, tNum, gNum;
printf("Enter three integer numbers: ");
scanf("%d %d %d", & fNum, & sNum, & tNum);
gNum = fNum>sNum?(fNum>tNum?fNum:tNum):(sNum>tNum?sNum:tNum);
printf("%d is the greatest number.", gNum);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment