(1) If I wanted the following piece of code to input an integer and a character and print them, while assuming the user types as input 100 A, what corrections do I need:
.
.
.
scanf( "%d", &intVal );
charVal = getchar();
printf( "Integer: %d\nCharacter: %c\n", intVal, charVal);
.
.
.
(2) I want the piece of code to output even integers from 2 to 100.
.
.
.
counter = 2;
Do {
if (counter % 2 == 0)printf ( "%d\n", counter );
counter += 2;
} While ( counter < 100);