• Now Online : 54
  • admin@codemyne.net

Introduction

The program shows the greatest number among three numbers. Here three different numbers are entered by user and by using if else conditions the greatest number of those three numbers is displayed as output.

#include<stdio.h>
#include<conio.h>
void main()
{
    int a,b,c;
    clrscr();
    printf("/n Enter three number:");
    scanf("%d %d %d",&a,&b,&c);
    if(a>b && a>c)
    printf("%d is greater",a);
    else if(b>c)
    printf("%d is greater",b);
    else
    printf("%d is greater",c);
            
    getch();
}

Comments/Suggestions are invited. Happy coding......!

Comments Post a Comment