November 29, 2024

Wap in ‘C’ to find out the greatest number among given three integers

#include<stdio.h>
#include<conio.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 the greatest number",a);
     else if (b>a&&b>c)
     printf("%d is greatest number ",b);
    else
    printf("%d is the greatest number",c);
    getch( );
}

Leave a Reply

Your email address will not be published. Required fields are marked *