Aim:- Write Program Find Largest Number Using Programming c

 

Input:-

#include<stdio.h>

int main()

{

    int a,b,c;

    

    printf(“enter value of a=”);

    scanf(“%d”,&a);

    printf(“enter value of b=”);

    scanf(“%d”,&b);

    printf(“enter value of c=”);

    scanf(“%d”,&c);

    

    

    if(a>b && a>c)

    {

        printf(“a is largest”);

    }

    else if(b>a && b>c)

    {

        printf(“b is largest”);

    }

    else

    {

        printf(“c is largest”);

    }

    return 0;

}

Output:-

enter value of a=20

enter value of b=30

enter value of c=25

b is largest

Advertisements