Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Diagnostics.CodeAnalysis;
- using System.Diagnostics.SymbolStore;
- using System.Linq;
- using System.Text;
- class Program
- {
- static void Main()
- {
- int lines = Convert.ToInt32(Console.ReadLine());
- double percent = 0.35; // can be "readline" for custom discount, current 65%
- double discount;
- string result = "";
- for (int i = 0; i < lines; i++)
- {
- double digit = Convert.ToDouble(Console.ReadLine());
- discount = digit * percent;
- result =$"{result:F2}{discount:F2}\n";
- }
- Console.WriteLine($"{result:F2}");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement