Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double km = double.Parse(Console.ReadLine());
- var денонощие = Console.ReadLine();
- double prise = 1.00;
- double TaxiDay = 0.79;
- double TaxiNight = 0.90;
- double OneTax = 0.70;
- double BusTax = 0.09;
- double TrainTax = 0.06;
- if ( km < 20)
- {
- if (денонощие =="day")
- {
- Console.WriteLine((prise * TaxiDay) * (km) + OneTax);
- }
- else if (денонощие == "night")
- {
- Console.WriteLine((prise * TaxiNight) * (km) + OneTax);
- }
- }
- else if ( km < 100) {Console.WriteLine((prise * BusTax) * (km));}
- else if ( km >= 100) {Console.WriteLine((prise * TrainTax) * (km));}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement