MayaIP

Untitled

Jun 3rd, 2017
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace SolvingExpression
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13.  
  14. var beatsPerMinute = double.Parse(Console.ReadLine());
  15. var beatsDone = double.Parse(Console.ReadLine());
  16.  
  17. var bars = Math.Round(beatsDone * 0.25, 1);
  18. int totalSeconds = ((int)beatsDone * 60 / (int)beatsPerMinute);
  19. int minutes = totalSeconds / 60;
  20. int seconds = totalSeconds % 60;
  21.  
  22. Console.WriteLine($"{bars} bars - {minutes}m {seconds}s");
  23.  
  24. }
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment