Advertisement
Spocoman

Choreography

Oct 9th, 2023
1,158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.55 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.     int steps, dancers, days;
  8.     cin >> steps >> dancers >> days;
  9.  
  10.     double dayStepPercent = ceil((double)steps / days / steps * 100);
  11.     double dancerStepPercent = dayStepPercent / dancers;
  12.  
  13.     if (dayStepPercent < 13) {
  14.         printf("Yes, they will succeed in that goal! %.2f%%.", dancerStepPercent);
  15.     }
  16.     else {
  17.         printf("No, they will not succeed in that goal! Required %.2f%% steps to be learned per day.", dancerStepPercent);
  18.     }
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement