#include <stdio.h> int main() { int a, b, c, largest; printf ("Enter three numbers : "); scanf ("%d%d%d", &a, &b, &c); largest = a; // Let 'a' be the largest number if(b > largest) largest = b; if(c > largest) largest = c; printf ("\n%d is the largest number.", largest); // To find the smallest number, replace '>' with '<' return 0; } Link : https://repl.it/@nithin_gudla/largest3numbers Enter three numbers : 52 98 64 98 is the largest number.