Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace P04_BPMcounter
- {
- class Program
- {
- static void Main(string[] args)
- {
- int bpm = int.Parse(Console.ReadLine());
- int numOfBeats = int.Parse(Console.ReadLine());
- double seconds = numOfBeats * 60.0 / bpm;
- int minutes = (int)seconds / 60;
- seconds -= minutes * 60;
- Console.WriteLine($"{Math.Round(numOfBeats / 4.0, 1) } bars - { minutes}m {Math.Floor(seconds)}s");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment