Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Safari
- {
- class Program
- {
- static void Main(string[] args)
- {
- double budget = double.Parse(Console.ReadLine());
- double fuel = double.Parse(Console.ReadLine());
- string day = Console.ReadLine();
- double sum = fuel * 2.1 + 100;
- if (day == "Saturday")
- {
- sum *= 0.9;
- }
- else
- {
- sum *= 0.8;
- }
- if (budget >= sum)
- {
- Console.WriteLine($"Safari time! Money left: {budget - sum:F2} lv. ");
- }
- else
- {
- Console.WriteLine($"Not enough money! Money needed: {sum - budget:F2} lv.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement