Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace exampreparation
- {
- class exam
- {
- static void Main(string[] args)
- {
- double budget = double.Parse(Console.ReadLine());
- double gas = double.Parse(Console.ReadLine());
- string weekend = Console.ReadLine();
- double gasSum = gas * 2.10;
- double tourGuide = gasSum + 100;
- if (weekend == "Saturday")
- {
- tourGuide *= 0.90;
- }
- else
- {
- tourGuide *= 0.80;
- }
- if (budget >= tourGuide)
- {
- Console.WriteLine($"Safari time! Money left: {budget-tourGuide:f2} lv.");
- }
- else
- {
- Console.WriteLine($"Not enough money! Money needed: {tourGuide-budget:f2} lv.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement