pastebin

Paste Search Dynamic
Recent pastes
region
  1. #include<stdio.h>
  2. #include<math.h>
  3. int main()
  4. {
  5.     int h, region=0, n, b, ans;
  6.     float c, e, d;
  7. printf("please enter a number:");
  8. scanf("%d", &h);
  9. b=h%100;
  10. n=h/100;
  11. region=(b+3)/4;
  12. printf("%d is regionn", region);
  13. printf("Enter the initial jump:");
  14. scanf("%f", &c);
  15. d = c/2;
  16. e = 2*n+1-c;
  17. ans = e/d;
  18. if(ans*d>=e)
  19. {
  20.     printf("%d", ans);
  21. }
  22. else
  23. {
  24.     ans++;
  25.     printf("%d", ans);
  26. }
  27. return 0;
  28. }
Parsed in 0.007 seconds