Program to find largest of 3 numbers in C language (Program 08)

/*Made by Anmol main
Student B.tech Cse
Punjabi university
Hindustan Coding
Program 08*/

#include<stdio.h>
int main()
{   int a,b,c; //write the fixed values of a and b if not then take it from the user
    printf("Enter a number A \n");
    scanf("%d",&a);
    printf("Enter a number B\n");
    scanf("%d",&b);
    printf("Enter a number C \n");
    scanf("%d",&c);

    {   if (a>b&&a>c)
            printf("\nThe number A = %d is Greater\n",a);
        else if (b>a&&b>c)
            printf("\nThe number B = %d is Greater\n",b);
        else if (c>a&&c>b)
            printf("\nThe number C = %d is Greater\n",c);
        else
            printf("please enter diffrent values of A,B and C");

        }
    return 0;
}

Comments

Popular posts from this blog

C Pogram to play Sa-re-ga......sa wihout break (Program 25)

Hand cricket Game in C language - source code ( Program 15)