Biggest Of Three Numbers
Program Code :
int main(){
int a,b,c;
printf("Enter the value of a , b, and c\n");
scanf("%d%d%d",&a,&b,&c);
if(a>b && a>c){
printf("The biggest of three number is-->a=%d\n",a);
}
else if (b>a && b>c){
printf("The biggest of three number is-->b=%d\n",b);
}
else{
printf("The biggest number is-->c=%d\n",c);
}
return 0;
}
Hence , in this code Relational operators (< , > , <= , >= , == , !=) are used
Output :
Enter the value of a , b, and c
10
20
30
The biggest number is-->c=30
No comments:
Post a Comment