Answer:
R's share = 306
Explanation:
Sum of ratio = 1/3 + 1/2 + 1/5
LCM = 30
Sum of ratio = (10 + 15 + 6) / 30 = 31 /30
Profit to be shared = 1581
P = 1/3 ; Q = 1/2 ; R = 1/5
Share of R :
(Total profit / sum of ratio) * R ratio
[1581 / (31/30)] * 1/5
(1581 / 1 * 30/31) * 1/5
51 * 30 * 1/5
51 * 6 = 306
Your question wasn't very clear, but I think I understand what you want. Additionally, you should really state what language you're working with. Here it is in C#, and shouldn't be too much of a hassle to translate in to other languages.
Console.Write("Enter payment: ");
float payment;
if (float.TryParse(Console.ReadLine(), out payment))
Console.WriteLine((Math.Floor(payment * 100) / 100) * 0.15, + " at 15% tip.");
else
Console.WriteLine("Invalid input.");
The German mathematician & physicist ”Carl Friedrich Gauss”
Born: April 30, 1777, Brunswick, Germany
Died: February 23, 1855, Göttingen, Germany
The base-10 value of 52010 is equal to base-16 value of 20816.
False, the categories of software applications are not mutually exclusive.