Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int inputCount = 0;
- int averageSeconds = 0;
- DateTime data;
- string data_string;
- string[] stars = {
- "Gold star",
- "Silver star",
- "Bronze star"
- };
- data_string = Console.ReadLine ();
- do {
- data = DateTime.ParseExact (data_string, "mm:ss", CultureInfo.InvariantCulture);
- inputCount++;
- averageSeconds = data.Minute * 60 + data.Second;
- data_string = Console.ReadLine ();
- } while (data_string != "Quit");
- {
- if (averageSeconds < 720) {
- Console.WriteLine (stars [0]);
- } else if (averageSeconds >= 720 && averageSeconds < 1440) {
- Console.WriteLine (stars [1]);
- } else {
- Console.WriteLine (stars [2]);
- }
- Console.WriteLine ("Games - {0} {2} Average seconds {1}", inputCount, averageSeconds, new string ('\u005C', 1));
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement