Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Problem1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int ordersCount = int.Parse(Console.ReadLine());
- decimal total = 0;
- for (int i = 0; i < ordersCount; i++)
- {
- decimal pricePerCapsule = decimal.Parse(Console.ReadLine());
- int days = int.Parse(Console.ReadLine());
- int capsulesCount = int.Parse(Console.ReadLine());
- decimal priceForTheCoffee = days * capsulesCount * pricePerCapsule;
- total += priceForTheCoffee;
- Console.WriteLine($"The price for the coffee is: ${priceForTheCoffee:f2}");
- }
- Console.WriteLine($"Total: ${total:f2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement