Skip to content

Latest commit

 

History

History

LabTest1Max

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

LabTest 1.2

Write a program that read an integer as the total looping number. Then the program will read two doubles in the looping and will do the following:

  1. If the first number is higher than the second number, it will output the result of the first number minus the second number.
  2. If the second number is ZERO, then it will output the result of the first number multiplied by 2.
  3. If the first number is lower than the second number, it will output the result of the second number divided by the first number.
  4. If the first number is ZERO, then it will BREAK the loop.

Sample input:

10
2
40
20
15
90
0
0
10
18
29

Sample output:

40/2 = 20.0
20-15 = 5
90*2=180