Advertisement
Guest User

GlebTask3

a guest
Feb 22nd, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. include <iostream>
  2. using namespace std;
  3.  
  4. int calculate(a, b, h) {
  5.     int currentH;
  6.     int days=0;
  7.     while(current < h){
  8.         currentH = currentH + a - b;
  9.         days++;
  10.     }
  11.     return days;
  12. }
  13.  
  14. int main(){
  15.     int a, b, h;
  16.     cin >>  a;
  17.     cin >> b;
  18.     cin >> h;
  19.     cout << calculate(a, b, h);
  20.      
  21.     return 0;
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement