Sim0o0na

01. Sea Trip

Apr 30th, 2018
559
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace Exam
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double foodMoney = double.Parse(Console.ReadLine());
  10.             double souvenirMoney = double.Parse(Console.ReadLine());
  11.             double hotelMoney = double.Parse(Console.ReadLine());
  12.  
  13.             double sumForTransport = (420.0 / 100.0) * 7 * 1.85;
  14.             double foodAndSouvenir = 3 * foodMoney + 3 * souvenirMoney;
  15.             double sumForStay = hotelMoney * 0.9 + hotelMoney * 0.85 + hotelMoney * 0.8;
  16.  
  17.             double totalSum = sumForTransport + foodAndSouvenir + sumForStay;
  18.             Console.WriteLine($"Money needed: {totalSum:f2}");
  19.         }
  20.     }
  21. }
RAW Paste Data