Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Conditional_Statements_Advanced___More_Exercises
- {
- class Program
- {
- static void Main(string[] args)
- {
- double vip = 499.99;
- double normal = 249.99;
- double budget = double.Parse(Console.ReadLine());
- string category = Console.ReadLine();
- double people = double.Parse(Console.ReadLine());
- double transportniRazhodi = 0;
- if (people > 1 && people <= 4)
- {
- transportniRazhodi = budget - (75 * budget / 100);
- if (category == "Normal")
- {
- double ticketCost = normal * people;
- }
- else
- {
- double ticketCost = vip * people;
- }
- }
- else if (people >= 5 && people <= 9)
- {
- transportniRazhodi = budget - (60 * budget / 100);
- if (category == "Normal")
- {
- double ticketCost = normal * people;
- }
- else
- {
- double ticketCost = vip * people;
- }
- }
- else if (people >= 10 && people <= 24)
- {
- transportniRazhodi = budget - (50 * budget / 100);
- if (category == "Normal")
- {
- double ticketCost = normal * people;
- }
- else
- {
- double ticketCost = vip * people;
- }
- }
- else if (people >= 25 && people <= 49)
- {
- transportniRazhodi = budget - (40 * budget / 100);
- if (category == "Normal")
- {
- double ticketCost = normal * people;
- }
- else
- {
- double ticketCost = vip * people;
- }
- }
- else if (people >= 50)
- {
- transportniRazhodi = budget - (25 * budget / 100);
- if (category == "Normal")
- {
- double ticketCost = normal * people;
- }
- else
- {
- double ticketCost = vip * people;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement