Advertisement
Guest User

Untitled

a guest
May 27th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #include <cstdlib>
  2. #include <iostream>
  3. #define pi 3.14
  4. #define d 0.0193
  5.  
  6. using namespace std;
  7. int a, b, x, n;
  8. float V, P, r, k;
  9. int main(int argc, char *argv[])
  10. {
  11. int lol = 0;
  12. while(cin >> a >> b >> x >> n)
  13. {
  14. lol == 1 ? printf("\n", "") : lol = 1;
  15. if(b > 0 && a > 0 && a > b && x > 0)
  16. {
  17. r = b;
  18. r /= 2*pi;
  19. P = pi*r*r;
  20. V = P * a;
  21. k = V * d * x;
  22. if(n >= k) cout << "TAK";
  23. else cout << "NIE";
  24. }
  25. else cout << "BRAK";
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement