Write a c program to find out tthe largest number of given 3 numbers using if else
#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("Enter three numbers");
scanf("%d%d%d",&a,&b,&c);
printf("\n");
if(a>b&&c){printf("A is largest");}
else if(b>c&&a){printf("B is largest");}
else{printf("C is largest");}
getch();
}
Thank you for your time seeya again
No comments:
Post a Comment