Advertisement
Spocoman

Easter Lunch

Sep 17th, 2023
804
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.     int easterBreads, eggPacks, cookies;
  8.     cin >> easterBreads >> eggPacks >> cookies;
  9.  
  10.     double sum = 3.20 * easterBreads + 4.35 * eggPacks  + 5.4 * cookies + 0.15 * 12 * eggPacks;
  11.  
  12.     cout << fixed << setprecision(2) << sum << endl;
  13.     return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement