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 Sudoku_Results
- {
- static void Main(string[] args)
- {
- //31.ProgBasicsExam_8_November2015
- //Sudoku_Results
- string[] format = Console.ReadLine().Split(':');
- double mm = 0.0D;
- double ss = 0.0D;
- double minutes = 0.0D;
- double sum = 0.0D;
- double counter = 0;
- string word = string.Empty; // Не е нужно
- while (format[0] != "Quit")
- {
- mm = double.Parse(format[0]);
- ss = double.Parse(format[1]);
- minutes = mm * 60;
- sum += minutes + ss;
- counter++;
- format = Console.ReadLine().Split(':');
- }
- bool isGold = (sum) / counter < 720;
- if (isGold)
- {
- Console.WriteLine("Gold Star");
- Console.WriteLine("Games - {0} \\ Average seconds - {1}", counter, Math.Ceiling(sum / counter));
- }
- else if (sum / counter > 720 && sum / counter < 1440)
- {
- Console.WriteLine("Silver Star");
- Console.WriteLine("Games - {0} \\ Average seconds - {1}", counter, Math.Ceiling(sum / counter));
- }
- else
- {
- Console.WriteLine("Bronze Star");
- Console.WriteLine("Games - {0} \\ Average seconds - {1}", counter, Math.Ceiling(sum / counter));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement