Answer to Question #288182 in C for Daniel Garcia

Question #288182

Make a c program that asks the users 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:13-0500
#include<conio.h>
#include<stdio.h>
#include<stdlib.h>



/*
	Make a c program that asks the users 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.
*/




int main()
{
	int a,b;
	
	printf("\n\tEnter a = "); scanf("%d",&a);
	printf("\n\tEnter b = "); scanf("%d",&b);
	
	if(a+b>=25) printf("\n\tI LOVE MY PARENTS");
	else		printf("\n\tI WILL NEVER GIVE UP");
	
	if(a>b) printf("\n\ta (=%d) is greater than b(=%d)",a,b);
	if(a<b) printf("\n\tb (=%d) is greater than a(=%d)",b,a);
	if(a==b) printf("\n\ta == b ==  %d",a);
	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