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