Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- class SudokuResults
- {
- static void Main()
- {
- decimal plays = 0.0M;
- int allInSeconds = 0;
- while (true)
- {
- string timeInString = Console.ReadLine();
- if (timeInString == "Quit")
- {
- break;
- }
- string[] splitString = timeInString.Split(':');
- int minutes = int.Parse(splitString[0]);
- int seconds = int.Parse(splitString[1]);
- minutes *= 60;
- minutes += seconds;
- plays++;
- allInSeconds += minutes;
- }
- decimal avg = allInSeconds / plays;
- if (avg < 720)
- {
- Console.WriteLine("Gold Star");
- Console.WriteLine("Games - {0:F0} \\ Average seconds - {1}", plays, Math.Ceiling(avg));
- }
- else if (avg >= 720 && avg <= 1440)
- {
- Console.WriteLine("Silver Star");
- Console.WriteLine("Games - {0:F0} \\ Average seconds - {1}", plays, Math.Ceiling(avg));
- }
- else if (avg >= 1440)
- {
- Console.WriteLine("Bronze Star");
- Console.WriteLine("Games - {0:F0} \\ Average seconds - {1}", plays, Math.Ceiling(avg));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement