Advertisement
Guest User

Untitled

a guest
May 28th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. namespace ConsoleApplication5
  2. {
  3. using System;
  4. using System.Collections.Generic;
  5. public class Program
  6. {
  7. public static void Main(string[] args)
  8. {
  9. string name = Console.ReadLine();
  10. int quantity = int.Parse(Console.ReadLine());
  11. if (name == "Athlete") Console.WriteLine("The Athlete has to pay {0:f2}.",0.70*quantity);
  12. else if (name == "Businessman" || name == "Businesswoman") Console.WriteLine("The " + name + " has to pay {0:f2}.",quantity);
  13. else if (name == "SoftUni Student") Console.WriteLine("The SoftUni Student has to pay {0:f2}.",quantity*1.70);
  14. else Console.WriteLine("The {1} has to pay {0:f2}.",quantity * 1.20,name );
  15. }
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement