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;
- namespace SolvingExpression
- {
- class Program
- {
- static void Main(string[] args)
- {
- var beatsPerMinute = double.Parse(Console.ReadLine());
- var beatsDone = double.Parse(Console.ReadLine());
- var bars = Math.Round(beatsDone * 0.25, 1);
- int totalSeconds = ((int)beatsDone * 60 / (int)beatsPerMinute);
- int minutes = totalSeconds / 60;
- int seconds = totalSeconds % 60;
- Console.WriteLine($"{bars} bars - {minutes}m {seconds}s");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment