Rotate your phone or change to desktop for better experience

Rotate your phone or change to desktop for better experience

PROGRAM TO READ THREE NUMBERS AND FIND THE BIGGEST OF THREE

 // PROGRAM TO READ THREE NUMBERS AND FIND THE BIGGEST OF THREE


#include <stdio.h>
void main()
{
    int a,b,c;

    printf("enter the value of a\n");
    scanf("%d",&a);
    printf("enter  the value of b\n");
    scanf("%d",&b);
    printf("enter the value of c\n");
    scanf("%d",&c);

    if (a>b  && a>c)
    {
        printf("a is bigger");
    }
    else if(b>a && b>c)
    {
        printf("n is bigger");
    }
    else
    {
        printf("b is larger");
    }
}

Post a Comment

0 Comments