Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Sudoku_Results
- {
- class MainClass
- {
- public static void Main (string[] args)
- {
- TimeSpan TS = new TimeSpan ();
- int count_game = 0;
- int Second = 0;
- int Average_seconds = 0;
- string k = Console.ReadLine ();
- do {
- int mm = Convert.ToInt32(k.Substring (0, k.IndexOf(':')));
- int ss = Convert.ToInt32(k.Substring (k.IndexOf(':') + 1, 2));
- TimeSpan LTS = new TimeSpan(0,(int)mm,(int)ss);
- TS = TS.Add(LTS);
- k = Console.ReadLine ();
- count_game++;
- } while (k != "Quit");
- Average_seconds = Convert.ToInt32(Math.Ceiling(TS.TotalSeconds / count_game));
- if (Average_seconds < 720) {
- Console.WriteLine ("Gold Star");
- } else if (Average_seconds >= 720 && Average_seconds < 1440) {
- Console.WriteLine ("Silver Star");
- } else {
- Console.WriteLine ("Bronze Star");
- }
- Console.WriteLine ("Games - {0} \\ Average seconds - {1}", count_game, Average_seconds);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement