Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ExamPoints
- {
- class Program
- {
- static void Main(string[] args)
- {
- // Input task count
- // Input points
- // Input module
- // Calculate result
- // Print output
- int taskCount = int.Parse(Console.ReadLine());
- int points = int.Parse(Console.ReadLine());
- string module = Console.ReadLine();
- double result = 0;
- switch (module)
- {
- case "Basics":
- switch (taskCount)
- {
- case 1:
- result = 8;
- break;
- case 2:
- result = 9;
- break;
- case 3:
- result = 9;
- break;
- case 4:
- result = 10;
- break;
- }
- break;
- case "Fundamentals":
- switch (taskCount)
- {
- case 1:
- result = 11;
- break;
- case 2:
- result = 11;
- break;
- case 3:
- result = 12;
- break;
- case 4:
- result = 13;
- break;
- }
- break;
- case "Advanced":
- switch (taskCount)
- {
- case 1:
- result = 14;
- break;
- case 2:
- result = 14;
- break;
- case 3:
- result = 15;
- break;
- case 4:
- result = 16;
- break;
- }
- break;
- }
- result *= points;
- if (module == "Advanced")
- {
- result *= 1.2;
- }
- else if (module == "Basics" && taskCount == 1)
- {
- result *= 0.8;
- }
- Console.WriteLine($"Total points: {result / 100:f2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment