#include <iostream> #include <cmath> using namespace std; int main() { double a,b; scanf("%lf %lf", &a, &b); for (int x =-a; x <= a; x++){ for (int y = -b; y <= b; y++){ if ( (x*x)/(a*a)+(y*y)/(b*b) <= 1 ) printf("(%d,%d)\n", x, y); }} return 0; }
3 2
(-3,0) (-2,-1) (-2,0) (-2,1) (-1,-1) (-1,0) (-1,1) (0,-2) (0,-1) (0,0) (0,1) (0,2) (1,-1) (1,0) (1,1) (2,-1) (2,0) (2,1) (3,0)