Answer to Question #288130 in C for Jayson

Question #288130

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.

1
Expert's answer
2022-01-17T08:25:30-0500
#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;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS