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

Stats:

CreatedNov 29, 2016
Warriors Trained32
Total Skips0
Total Code Submissions120
Total Times Completed12
JavaScript Completions12
Total Stars0
% of votes with a positive feedback rating20% of 5
Total "Very Satisfied" Votes0
Total "Somewhat Satisfied" Votes2
Total "Not Satisfied" Votes3
Total Rank Assessments4
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • ameliejyc Avatar
Ad