In what concerns the continuous evaluation solving exercises grade during the semester, you should submit until 23:59 of March 3rd
(this exercise will still be available for submission after that deadline, but without couting towards your grade)
[to understand the context of this problem, you should read the class #01 exercise sheet]
Splitting the dinner bill can sometimes be confusing, especially when everyone wants to pay an equal share.
Write a program that the price T of a dinner and the number N of people having that dinner, calculates how much each person should pay, assuming each one pays an equal share.
The first line contains T, a floating-point number representing the total price of the bill.
The second line contains N, an integer representing the number of people.
The output should be a single line with the amount each person must pay, rounded to two decimal places.
The following limits are guaranteed in all the test cases that will be given to your program:
0 < T ≤ 1000 | Total amount to pay | |
1 ≤ N ≤ 50 | Number of people |
Example Input 1 | Example Output 1 |
65.5 4 |
16.38 |
Example Input 2 | Example Output 2 |
23.78 2 |
11.89 |