Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdlib>
- #include <iostream>
- #define pi 3.14
- #define d 0.0193
- using namespace std;
- int a, b, x, n;
- float V, P, r, k;
- int main(int argc, char *argv[])
- {
- int lol = 0;
- while(cin >> a >> b >> x >> n)
- {
- lol == 1 ? printf("\n", "") : lol = 1;
- if(b > 0 && a > 0 && a > b && x > 0)
- {
- r = b;
- r /= 2*pi;
- P = pi*r*r;
- V = P * a;
- k = V * d * x;
- if(n >= k) cout << "TAK";
- else cout << "NIE";
- }
- else cout << "BRAK";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement