Practise building up arithmetic expressions with integers, floats, floor division and the modulo operator.
Five values are read from the standard input, one per line, in this order:
a — an integerb — an integerprice — an integerdiscount_percent — a float (a percentage, e.g. 5.75 means 5.75%)total_mins — an integer number of minutesAssign the following variables:
output1 (int) — the sum of a and boutput2 (int) — twice the sum of a and boutput3 (int) — the absolute difference between a and boutput4 (int) — the absolute difference between the sum of a and b and the product of a and bdiscounted_price (float) — price after taking off discount_percent percent of itrounded_discounted_price (int) — discounted_price rounded to the nearest whole numberhrs (int) — the whole number of hours in total_mins (hint: floor division)mins (int) — the minutes left over after those whole hoursThe input is read for you. Assign the answers to output1, output2, output3, output4, discounted_price, rounded_discounted_price, hrs, mins.
You do not need to print anything — the values you assign to those names are what gets checked, in that order.
Input
5
6
80
5.75
470
Output
11
22
1
19
75.4
75
7
50