Search This Blog

Tuesday 23 November 2021

2. Write a C Program to read three numbers and find the biggest of three.

/*2. Write a C Program to read three numbers and find the biggest of three */

#include<stdio.h>

void main()

{

     int a,b,c,big;

     clrscr();

     printf("Enter three numbers:\n");

     scanf("%d%d%d",&a,&b,&c);

     if(a>b && a>c)

     {

          big=a;

     }

     else if(b>c)

     {

          big=b;

     }

     else

     {

          big=c;

     }

     printf("Biggest number is %d",big);

     getch();

}

No comments :

Post a Comment

FREE Hit Counters