//Developed By Muhammad Rakib Hasan
//Find largest number using if statement only in C Programming
#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 : %d", a);
if(b>=a && b>=c)
printf("Largest number : %d", b);
if(c>=a && c>=b)
printf("Largest number is : %d", c);
return 0;
}
//Find largest number using if statement only in C Programming
#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 : %d", a);
if(b>=a && b>=c)
printf("Largest number : %d", b);
if(c>=a && c>=b)
printf("Largest number is : %d", c);
return 0;
}
Result :
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন