Retired
Split the bill (retired)
Description:
The bill arrives at your table and you and your friends want to split the bill evenly but taking into account those who drank beer and those who didn't. The drinkers in the group offer to pay 20% more each than the non-drinkers.
Write a function that takes the total
bill (a positive number), the number of people in your group
and the number of drinkers
, and outputs a string of two values: the amount that each of the non-drinkers should pay followed by the amount that each of the drinkers should pay, which should be 20% more.
Keep the values to 2 decimal places.
Fundamentals
Basic Language Features
Mathematics
Algorithms
Logic
Numbers
Similar Kata:
Stats:
Created | Nov 29, 2016 |
Warriors Trained | 32 |
Total Skips | 0 |
Total Code Submissions | 120 |
Total Times Completed | 12 |
JavaScript Completions | 12 |
Total Stars | 0 |
% of votes with a positive feedback rating | 20% of 5 |
Total "Very Satisfied" Votes | 0 |
Total "Somewhat Satisfied" Votes | 2 |
Total "Not Satisfied" Votes | 3 |
Total Rank Assessments | 4 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 8 kyu |