Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main() {
- int movieTime, scene, sceneTime;
- cin >> movieTime >> scene >> sceneTime;
- double total = 0.15 * movieTime + scene * sceneTime;
- if (total >= movieTime) {
- cout << "Time is up! To complete the movie you need " << round(total - movieTime) << " minutes.\n";
- }
- else {
- cout << "You managed to finish the movie on time! You have " << round(movieTime - total) << " minutes left!\n";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement