Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <cmath>
- #include <iomanip>
- using namespace std;
- int main() {
- double c1;
- cin >> c1;
- double c2;
- cin >> c2;
- double c3;
- cin >> c3;
- double first_paying = c1 / 3;
- double second_paying = first_paying + ((c2 - c1) / 2);
- double third_paying = second_paying + c3 - c2;
- cout << fixed << setprecision(2) << first_paying << endl;
- cout << fixed << setprecision(2) << second_paying << endl;
- cout << fixed << setprecision(2) << third_paying << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement