//Developed By Muhammad Rakib Hasan
// Find largest number using if...else statement with and operator
#include <stdio.h>
int main(){
int a, b, c;
printf("Enter the First Number : ");
scanf("%d", &a);
printf("Enter the second Number : ");
scanf("%d", &b);
printf("Enter The Third Number : ");
scanf("%d", &c);
if(a>=b && a>=c)
printf("Largest number is: %d", a);
else if(b>=a && b>=c)
printf("Largest number is: %d", b);
else
printf("Largest number is: %d", c);
return 0;
}
// Find largest number using if...else statement with and operator
#include <stdio.h>
int main(){
int a, b, c;
printf("Enter the First Number : ");
scanf("%d", &a);
printf("Enter the second Number : ");
scanf("%d", &b);
printf("Enter The Third Number : ");
scanf("%d", &c);
if(a>=b && a>=c)
printf("Largest number is: %d", a);
else if(b>=a && b>=c)
printf("Largest number is: %d", b);
else
printf("Largest number is: %d", c);
return 0;
}
Result :
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন