C program to find largest number among three entered numbers

C program to find largest number among three entered numbers, Write a c program to read three numbers and display the largest number among them.

Write a program to take three integer number input from user and find greater number among them.

Write a c program to read three numbers and display the largest number among them.

C Code


#include <stdio.h>
#include <conio.h>
#include <math.h>
void main()
{

  int a, b, c;

  printf("enter three numbers:");
  scanf("%d%d%d",&a,&b,&c);

  if(a>=b && a>=c)
    printf("%d is greater",a);
  else if (b>=a && b>=c)
    printf("%d is greater",b);
  else
    printf("%d is greater",c);

  getch();
}

Output

largest number among three entered numbers

You May Also Like...

Subscribe Us