Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- double mackerelPrice, spratPrice, bonitoFishKg, saffronKg, shellKg;
- cin >> mackerelPrice >> spratPrice >> bonitoFishKg >> saffronKg >> shellKg;
- double bonitoFishSum = bonitoFishKg * mackerelPrice * 1.60;
- double saffronSum = saffronKg * spratPrice * 1.80;
- double shellSum = shellKg * 7.50;
- double totalPrice = bonitoFishSum + saffronSum + shellSum;
- cout.setf(ios::fixed);
- cout.precision(2);
- cout << totalPrice << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement