If-else:



Problem-1: Write a C program to cheek two number is not 

same, and print it is “Same Number” and if they are not same

 print “sorry it is not same,

Output:



“Same Number”


“Same Number”


Note: one number is 1 and another is 3


Solution:




Problem-2: Write a C program taking  two numbers from the

 user and check if they are the same or not .



Input: Output:


4 “Same Number”


2 “Not Same Number”( else condition)



Note: using the integer data type


Solution:





Problem-3: Write a C program taking  two

 numbers from the user and check two number’s sums are greater

 than their minus.


Input: Output:


4 “Yes ture”


2 “Not ”( else condition)




Note: use integer data type.


Solution:




Problem-4:Write a C program taking  two integer

 numbers from the user check two 

number’s multiplication are greater than their 

Minus or not. And print it “The multiplications are greater

 than minus.”


Note: Using the float data type


Solution:





Problem-5: Write a C program to check two

 number’s multiplication are greater than their

 Divide or not. 


Note: Use double data type.


Solution:




Problem-6: Write a C program to check five 

number’s multiplication are greater than their

 Divide or not


Note: Use double data type


Solution:





Problem-7: Write a C program to check two

 number’s multiplication are greater than their 

Divide or not 




Note: using integer data type 


Solution:




Problem-8: Write a C program to check two 

number’s multiplication are greater than their 

divide. And print it the value of two numbers.


Output:


 4 and 2 multiplication is 8 and divide is 2.


Note: the will not zero and using integer data type 


Solution:





Problem-9: Write a C program taking  two 

numbers from the user and check their

multiplication is greater than their divide.

 And print it the value of two number


Input: Output:


4 4 and 2 multiplication 

is 8 and divide is 2.


2


0 sorry it is same


2



Note: using float data type 


Solution:


Post a Comment

Previous Post Next Post