All pastes #613663 Raw Edit

Someone

public text v1 · immutable
·published 2007-07-11 03:13 UTC
rendered paste body
int main()
{
	int i;
	int k;
	char response[1];
	char wordarray[MAXWORD + 1][MAXLEN + 1];
	char tempword[MAXLEN * 3];
	
	for( i = 0; i < MAXWORD; i++ )
	{
		printf( "Enter a Word: " );
		scanf( "%s", tempword );
		
		if( strlen( tempword ) > MAXLEN )
		{
			printf( "Word is too long, please enter a word that is 15 characters or less.\n" );
			i--;
		}
		else
		{
			strcpy( wordarray[i], tempword );
			printf( "Do you have more words? (y or n): " );
			scanf( "%c", response );
			if( strcmp( 'n', response ) == 0 )
			{
				break;
			}
		}
	}

	for( i = 0; i < MAXWORD; i++ )
	{
		printf( "%s\n", wordarray[i] );
	}

	return 0;
}