C; Biggest b/w 3 numbers
Program:
#include<stdio.h>
int main ()
{
int a,b,c,big;
printf("enter 1st number: ");
scanf("%d", &a);
printf("enter 2nd number: ");
scanf("%d", &b);
printf("enter 3rd number: ");
scanf("%d", &c);
if(a>b && a>c)
big = a;
if(b>a && b>c)
big = b;
if(c>b && c>a)
big = c;
printf("the biggest number is : %d", big);
return 0;
}
Output:
enter 1st number: 23
enter 2nd number: 56
enter 3rd number: 78
the biggest number is : 78
Comments
Post a Comment