When you press return, it's supposed to go to a new row, but I'm a little confused and need help. Here are instructions.
Write a program that gets as an input:
• A perimeter (boundary) of a “closed” shape, such as an ellipse, circle, etc,.
• Coordinates of an interior point.
The program should fill in a recursive way the area (enclosed by) this shape from the given interior point without exceeding the boundary of this shape. For example if the

The input will include:
• m lines, each including n characters. If the character read is not a space, the character belongs
to the boundary of the shape.
• Two numbers that specify the coordinates, namely the row and column indices of the point from which the program is supposed to start filling the shape.

This is what I have so far, any help would be greatly appreciated, thanks
 ``123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128`` ``````#include #include "genlib.h" #include "simpio.h" #include "strlib.h" #define max 30 void prep(char shape[max][max], int b1, int b2) { int i, c; for(i=0;i=0;i--) { for(c=b1-1;c>=0;c--) { if(shape[i][c]==42) break; else(shape[i][c]=35); } } for(i=0;i=0;i--) { for(c=b2-1;c>=0;c--) { if(shape[c][i]==42) break; else(shape[c][i]=35); } } } void getArray(char shape[max][max], int b1, int b2) { int n, t; char b; printf("Enter your shape's boundaries, and when you have reached the end of your row press enter. Repeat until shape is completed\n"); for(n=0;n=b2-1)||(c>=b1-1)||(shape[r][c]==35)) { return; } else { shape[r][c]=42; i=r-1; while (i<=r+1) { n=c-1; while (n<=c+1) { fill(shape,i,n, b1, b2); n=n+1;} i=i+1; } } } void displayArray1(char shape[max][max], int b1, int b2) { int i, n; for(i=0;i
Topic archived. No new replies allowed.