Ok, so I am having trouble on trying to figure out how to populate my array with a single character. Everytime I run my program, it skips through the part where I ask the user to input the first character corresponding the person's home state (abbrev). Like for CA, enter C and store into speakerstate1[i][j].
I think I'm suppose to use getchar() and putchar()
Here's a piece of my code...
Thank you!!
Code:
for( i = 0; i < 3; i++ )
{
speaker_info();
printf( "\nBased on the information above. Please enter the first speaker/performer's series code:" );
for( j = 0; j < num; j++ )
{
scanf( "%c", &speakerchar[i][j] );
i++;
printf( "\n\n\nPlease enter the first letter of the speakers home state:" );
scanf( "%c", &speakerchar[i][j] );
i++;
printf( "\nPlease enter the second letter of the speakers home state:\n\n" );
scanf( "%c", &speakerchar[i][j] );
i = 0;
speaker_info();
printf( "\nBased on the information above. Please enter the next speaker/performer's series code:" );
}
i = 3;
}