desislava_topuzakova

08. Pet Shop

Jan 8th, 2022
1,438
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.     int dogsCount;
  7.     int petsCount;
  8.  
  9.     cin >> dogsCount >> petsCount;
  10.  
  11.     double result = dogsCount * 2.5 + petsCount * 4;
  12.  
  13.     cout.setf(ios::fixed);
  14.     cout.precision(2);
  15.  
  16.     cout << result << " lv.";
  17.  
  18.     return 0;
  19. }
  20.  
  21.  
Advertisement
Add Comment
Please, Sign In to add comment