Advertisement
f0rc3ful

Calculate Discount

Jan 27th, 2023
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. int n = int.Parse(Console.ReadLine());
  2. for (int m = 1; m <= n; m++)
  3. {
  4. double discounted = Math.Round(0.35*double.Parse(Console.ReadLine()), 2);
  5. if (m == n)
  6. {
  7. for (int p = 1; p <= n; p++)
  8. {
  9. Console.WriteLine(discounted);
  10. }
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement