Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- int minutes, seconds;
- cin >> minutes >> seconds;
- double lengthInMeters, secondsFor100Meters;
- cin >> lengthInMeters >> secondsFor100Meters;
- int control = minutes * 60 + seconds;
- double time = lengthInMeters / 100 * secondsFor100Meters - lengthInMeters / 120 * 2.5;
- if (time <= control) {
- printf("Marin Bangiev won an Olympic quota!\nHis time is %.3f.\n", time);
- }
- else {
- printf("No, Marin failed! He was %.3f second slower.", time - control);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement