Advertisement
Spocoman

Fish Land

Sep 18th, 2023
783
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.     double mackerelPrice, spratPrice, bonitoFishKg, saffronKg, shellKg;
  8.     cin >> mackerelPrice >> spratPrice >> bonitoFishKg >> saffronKg >> shellKg;
  9.  
  10.     double bonitoFishSum = bonitoFishKg * mackerelPrice * 1.60;
  11.     double saffronSum = saffronKg * spratPrice * 1.80;
  12.     double shellSum = shellKg * 7.50;
  13.  
  14.     printf("%.2f\n", bonitoFishSum + saffronSum + shellSum);
  15.  
  16.     return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement