Lab 2

Assignment-Lab 2, Write a program

           Write a program that asks the user to enter two integer numbers x and y. The program should perform the following operations and display the results back

1- The sum x + y

2- The difference x – y

3- The product x * y

4- The quotient x/y

5- The remainder x%y

6- Whether x is less than, equal, or greater than y

       After displaying the results, the program should ask again for two integer numbers and repeat the operations for the new values entered. If either the value of x or y entered by the user is 0 (zero), the program should finish.

Description– Start off with writing out the definition of the x and y value, then you will have to make the code that will make the program recognize the condition with the While Loop and proceed with the equations if the input doesn’t fall under the condition of the function to not work.

Lab2lab2 result

 

Leave a Reply

Your email address will not be published. Required fields are marked *