I need to ask the user how high and wide a comment box to draw and then when I run the compiler it will draw such a box of the appropriate size. Here is my code that I am using:
int main() {
int i;
writePattern('/', '*', '/', ' ', ' ',1, LENGTH-2,1,0,0, LENGTH); //top of box being created
for(i=1; i<=5; i++)
writePattern('/', '*', ' ', '*', '/', 1,1, LENGTH-4, 1,1, LENGTH); //sides of box
writePattern('/', '*', '/', ' ', ' ', 1 , LENGTH-2,1,0,0,LENGTH); //bottom of box
return 0;
}
So how would I do this? I am new to C so I need some help. I know I will have to use the printf and scanf functions do read in user input but I am not sure how to do this.