Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main() {
- int steps, dancers, days;
- cin >> steps >> dancers >> days;
- double dayStepPercent = ceil((double)steps / days / steps * 100);
- double dancerStepPercent = dayStepPercent / dancers;
- if (dayStepPercent < 13) {
- printf("Yes, they will succeed in that goal! %.2f%%.", dancerStepPercent);
- }
- else {
- printf("No, they will not succeed in that goal! Required %.2f%% steps to be learned per day.", dancerStepPercent);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement