fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void bep(int a, int b, int c){
  5. int count;
  6. while(1){
  7. count++;
  8. if(c-b <= 0){
  9. cout << "-1";
  10. break;
  11. }
  12. else{
  13. cout << count;
  14. break;
  15. }
  16. }
  17. }
  18.  
  19. int main() {
  20. int a, b, c;
  21.  
  22. cin >> a >> b >> c;
  23.  
  24. bep(a,b,c);
  25.  
  26. return 0;
  27. }
Success #stdin #stdout 0s 15232KB
stdin
1000 70 170
stdout
1