Saturday, 1 September 2012

WAP to find the greatest of 3 numbers

  • WAP to find the greatest of 3 numbers
#include <stdio.h>
#include <conio.h>
void main()
{
    int a,b,c;
    clrscr();
    printf("Enter three numbers");
    scanf("%d%d%d",&a,&b,&c);
    if(a>b&&a>c)
    printf("%d is greatest",a) ;
    else if(b>a&&b>c)
    printf("%d is greatest",b);
    else
    printf("%d is greater",c);
    getch();
   }

No comments:

Post a Comment