I used this code: double x, y; cin >> x >> y; x *= 1000; y *= 1000; int X = (int)x, Y = (int)y;
But this code doesn't work properly. For example, if x = -1.001, then X will be -1000 (in some cases one unit is lost). How to avoid this in C++? To solve this problem I had to read whole string and then parse it :)
Really? This ought to be one of the most confusing statements I've ever seen, if this is true... "The captain can’t rotate the weapon aiming system." How come I can be at point (0, 0) and shoot at (1, 0) and (0, 1) if I can't rotate the aiming system?