Zhaniartt

Untitled

Oct 25th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Janka
  4. {
  5. class MainClass
  6. {
  7. public static void Main(string[] args)
  8. {
  9. double onwayTicket = double.Parse(Console.ReadLine());
  10. double backwayTicket = double.Parse(Console.ReadLine());
  11. double gameTicket = double.Parse(Console.ReadLine());
  12. double numberGames = double.Parse(Console.ReadLine());
  13. double discount = double.Parse(Console.ReadLine());
  14.  
  15. double ticketsForAll = 6 * (onwayTicket + backwayTicket);
  16. double discount1 = (ticketsForAll * 15) / 100;
  17. double afterdiscount = ticketsForAll - discount1;
  18. double totalSumforbilets = 6 * numberGames * gameTicket;
  19. double totalSUM = afterdiscount + totalSumforbilets;
  20. double singlePay = totalSUM / 6;
  21.  
  22. Console.WriteLine($"Total sum: {totalSUM:f2} lv.");
  23. Console.WriteLine($"Each friends has to pay {singlePay:f2} lv.");
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment