Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace ConsoleApplication5
- {
- using System;
- using System.Collections.Generic;
- public class Program
- {
- public static void Main(string[] args)
- {
- string name = Console.ReadLine();
- int quantity = int.Parse(Console.ReadLine());
- if (name == "Athlete") Console.WriteLine("The Athlete has to pay {0:f2}.",0.70*quantity);
- else if (name == "Businessman" || name == "Businesswoman") Console.WriteLine("The " + name + " has to pay {0:f2}.",quantity);
- else if (name == "SoftUni Student") Console.WriteLine("The SoftUni Student has to pay {0:f2}.",quantity*1.70);
- else Console.WriteLine("The {1} has to pay {0:f2}.",quantity * 1.20,name );
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement