Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Vacation
- {
- class Program
- {
- static void Main(string[] args)
- {
- int purvi = int.Parse(Console.ReadLine());
- int vtori = int.Parse(Console.ReadLine());
- int treti = int.Parse(Console.ReadLine());
- string chetvurti = Console.ReadLine();
- if (chetvurti == "train" && purvi + vtori >= 50)
- {
- double Train = (purvi * 24.99) / 2 + (vtori * 14.99) / 2;
- Train = Train * 2;
- double hotel = (treti * 82.99);
- double komisionna = (Train + hotel) * 0.10;
- double suma = Train + hotel + komisionna;
- Console.WriteLine("{0:f2}", suma);
- }
- else if (chetvurti == "train")
- {
- double Train = (purvi * 24.99) + (vtori * 14.99);
- Train = Train * 2;
- double hotel = (treti * 82.99);
- double komisionna = (Train + hotel) * 0.10;
- double suma = Train + hotel + komisionna;
- Console.WriteLine("{0:f2}", suma);
- }
- else if (chetvurti == "bus")
- {
- double Bus = (purvi * 32.50) + (vtori * 28.50);
- Bus = Bus * 2;
- double BusHotel = (treti * 82.99);
- double komisionnaBus = (Bus + BusHotel) * 0.10;
- double sumaBus = Bus + BusHotel + komisionnaBus;
- Console.WriteLine("{0:f2}", sumaBus);
- }
- else if (chetvurti == "boat")
- {
- double Boat = (purvi * 42.99) + (vtori * 39.99);
- Boat = Boat * 2;
- double BoatHotel = (treti * 82.99);
- double komisionnaBoat = (Boat + BoatHotel) * 0.10;
- double sumaBoat = Boat + BoatHotel + komisionnaBoat;
- Console.WriteLine("{0:f2}", sumaBoat);
- }
- else if (chetvurti == "airplane")
- {
- double airplane = (purvi * 70.00) + (vtori * 50.00);
- airplane = airplane * 2;
- double AirpalneHotel = (treti * 82.99);
- double komisionnaAirplane = (airplane + AirpalneHotel) * 0.10;
- double sumaAirplane = airplane + AirpalneHotel + komisionnaAirplane;
- Console.WriteLine("{0:f2}", sumaAirplane);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement