Advertisement
Icakman

Sea Trip

Nov 24th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp1
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. double food = double.Parse(Console.ReadLine());
  14. double souv = double.Parse(Console.ReadLine());
  15. double hotel = double.Parse(Console.ReadLine());
  16. double hotel1 = hotel * 0.9;
  17. double hotel2 = hotel * 0.85;
  18. double hotel3 = hotel * 0.8;
  19. double gas = 420 / 100 * 7;
  20. double gasPr = 29.4 * 1.85;
  21. double souvfood = 3 * food + 3 * souv;
  22. double total = gasPr + souvfood + hotel1 + hotel2 + hotel3;
  23. Console.WriteLine($"Money needed: {total:F2}");
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement