Advertisement
Spocoman

Sea Trip

Sep 23rd, 2023 (edited)
1,042
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.63 KB | None | 0 0
  1. using System;
  2.  
  3. namespace SeaTrip
  4. {
  5.     internal class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double foodPrice = double.Parse(Console.ReadLine()) * 3;
  10.             double souvenirPrice = double.Parse(Console.ReadLine()) * 3;
  11.             double dayHotelPrice = double.Parse(Console.ReadLine());
  12.  
  13.             double hotelPrice = dayHotelPrice * 0.90 + dayHotelPrice * 0.85 + dayHotelPrice * 0.80;
  14.             double transportPrice = 210.0 * 2 / 100 * 7 * 1.85;
  15.  
  16.             Console.WriteLine($"Money needed: {foodPrice + souvenirPrice + hotelPrice + transportPrice:f2}");
  17.         }
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement