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()
- {
- string input = Console.ReadLine();
- double minutes = 0D;
- double seconds = 0D;
- int counter = 0;
- while (input != "Quit")
- {
- string[] time = input.Split(':');
- minutes = minutes + Double.Parse(time[0]);
- seconds = seconds + Double.Parse(time[1]);
- counter++;
- input = Console.ReadLine();
- }
- double totalTime = minutes * 60 + seconds;
- double avgTime = totalTime / counter;
- if (avgTime > 1440)
- {
- Console.WriteLine("Bronze Star");
- Console.WriteLine("Games - {0} \\ Average seconds - {1:F0}", counter, Math.Ceiling(avgTime));
- }
- else if (avgTime > 720 && avgTime < 1440)
- {
- Console.WriteLine("Sliver Star");
- Console.WriteLine("Games - {0} \\ Average seconds - {1:F0}", counter, Math.Ceiling(avgTime));
- }
- else if (avgTime < 720)
- {
- Console.WriteLine("Gold Star");
- Console.WriteLine("Games - {0} \\ Average seconds - {1:F0}", counter, Math.Ceiling(avgTime));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement