Threed90

01.SeaTrip

Oct 28th, 2018
307
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace _01.SeaTrip
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double food = double.Parse(Console.ReadLine());
  10.             double souvenirs = double.Parse(Console.ReadLine());
  11.             double hotel = double.Parse(Console.ReadLine());
  12.  
  13.             double travelExpenses = ((420.0 / 100) * 7) * 1.85;
  14.  
  15.             double FoodAndSouvenirsExpenses = 3 * food + 3 * souvenirs;
  16.  
  17.             double firstDayHotel = hotel * 0.9;
  18.             double secondDayHotel = hotel * 0.85;
  19.             double thirdDayHotel = hotel * 0.8;
  20.  
  21.             double total = travelExpenses + FoodAndSouvenirsExpenses + firstDayHotel + secondDayHotel + thirdDayHotel;
  22.  
  23.             Console.WriteLine($"Money needed: {total:f2}");
  24.         }
  25.     }
  26. }
RAW Paste Data