Advertisement
Spocoman

08. Pet Shop

Aug 23rd, 2024
106
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. using namespace std;
  3.  
  4. int main() {
  5.     double dogFoodPrice = 2.50, catFoodPrice = 4.00;
  6.  
  7.     int dogFoodCount, catFoodCount;
  8.     cin >> dogFoodCount >> catFoodCount;
  9.  
  10.     double totalPrice = dogFoodPrice * dogFoodCount + catFoodPrice * catFoodCount;
  11.  
  12.     cout << totalPrice << " lv." << endl;
  13.  
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement