Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- double salary;
- cin >> salary;
- int months;
- cin >> months;
- double minimalCosts;
- cin >> minimalCosts;
- double monthlySavings = salary * 0.70 - minimalCosts;
- printf("She can save %.2f%%\n%.2f", monthlySavings / salary * 100, monthlySavings * months);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement