Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- double record, meters, secondPerMeter;
- cin >> record >> meters >> secondPerMeter;
- double score = meters * secondPerMeter + (int)(meters / 50) * 30;
- if (score < record) {
- printf("Yes! The new record is %.2f seconds.\n", score);
- }
- else {
- printf("No! He was %.2f seconds slower.\n", score - record);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement