/* ACM East Central Programming Contest 1991 */ /* Problem 1 Scatter Plot */ /* requires the following input line 1 : two integers: Origin and increment values for X line 2 : two integers: Origin and increment values for Y Round coordinates to the nearest increment. Keep track of number of same coordinates. Print out ascii graph contain labels for each axis and a number of each coordinate. */ #include #define MAXCOL 12 #define MAXROW 20 #define MAXPAIRS 100 int round_it(); void graph(); int pairs[2][MAXPAIRS]; int graphplot[MAXROW][MAXCOL]; void main() { int x=0, y=1, i, r, num_of_pairs, lowx, lowy, hix, hiy, xinc, yinc; char c; for(i =0; i