Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- using namespace std;
- int main() {
- double strawberriesPrice, bananasKg, orangesKg, raspberriesKg, strawberriesKg;
- cin >> strawberriesPrice >> bananasKg >> orangesKg >> raspberriesKg >> strawberriesKg;
- double raspberriesPrice = strawberriesPrice / 2;
- double orangesPrice = raspberriesPrice * 0.6;
- double bananasPrice = raspberriesPrice / 5;
- double totalSum = strawberriesPrice * strawberriesKg + bananasPrice * bananasKg + orangesPrice * orangesKg + raspberriesPrice * raspberriesKg;
- cout << fixed << setprecision(2) << totalSum << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement