Advertisement
Spocoman

07. Food Delivery

Aug 31st, 2023 (edited)
743
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.62 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.     int chickenMenuCount, fishMenuCount, vegetarianMenuCount;
  7.     cin >> chickenMenuCount >> fishMenuCount >> vegetarianMenuCount;
  8.  
  9.     double chickenMenuPrice = chickenMenuCount * 10.35;
  10.     double fishMenuPrice = fishMenuCount * 12.40;
  11.     double vegeterianMenuPrice = vegetarianMenuCount * 8.15;
  12.     double delivery = 2.50;
  13.  
  14.     double menuPrice = chickenMenuPrice + fishMenuPrice + vegeterianMenuPrice;
  15.     double dessertPrice = menuPrice / 5;
  16.     double totalPrice = menuPrice + dessertPrice + delivery;
  17.  
  18.     cout << totalPrice << endl;
  19.  
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement