What I'm trying to do is write a program that creates the HTML tags for an N by M table. Basically I prompt the user for the number of rows N and the number of columns M. Then the program prompts the user for the N times M items that will go into the table, basically a string, or number.
Then the program writes out the HTML for a table that contains the items. I figured what I'll do I'll have any array for the max number of
rows and columns. Then after the user enters the number of rows and columns, a while loop would prompt the user to enter something for that row + column, until they're all filled.
That was my original intention, but all I keep getting is just a whole bunch of words the repeats itself like an never ending loop. And I'm
at a complete loss trying to figure this out.
Code:#include <stdio.h> /** */ int main( void ) { int rows; int columns; char string; int MaxRows[10]; int MaxColumns[10]; printf( "Enter the number of rows: " ); scanf( "%d" , &rows ); printf( "Enter the number of columns: " ); scanf( "%d" , &columns ); while( rows < MaxRows && columns < MaxColumns) printf( "Enter the text that will go into this row " ); printf( "your table: %d" , rows , columns ); }
If anybody can get me on the right track, or at tell me where I'm royaly screwing up, it would sure be appreciated.