make a c program that asks the user to enter two numbers. Then, get the total and DISPLAY"I LOVE MY PARENTS" if the sum is more than or equal to 25, otherwise DISPLAY "I WILL NEVER GIVE UP!". And show which number is greater and lower.
#include <stdio.h>
int main()
{
int a = 0, b = 0;
printf("Enter two numbers: ");
scanf("%d %d", &a, &b);
int result = a + b;
if(result >= 25)
{
printf("I LOVE MY PARENTS\n");
}
else
{
printf("I WILL NEVER GIVE UP!\n");
}
return 0;
}
Comments
Leave a comment