SHARE
TWEET

GlebTask3

a guest Feb 22nd, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top