Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdio.h"
- /* current problems */
- /* program builds, but hangs after user input */
- int main( void ) /* begin program */
- {
- int numClass = 0; /* initilize variable numClass, # of classes taken by end-user and defines initial value as 0 */
- printf(" How many Technical Classes have you taken?\n " ); /* asks user to input number of classes taken */
- scanf(" %d\n ", &numClass ); /* take input rom user and assign it to the numClass variable */
- if( numClass >= 6 ) /* first if else statement */
- {
- printf( " Experienced\t "); /* prints level of experience */
- printf( " Great job. Keep at it, there is always more to learn!\n " ); /* prints encouraging statement*/
- }
- else if(( numClass >= 3 ) && (numClass <= 5 )) /* second if else statement */
- {
- printf( " Intermediate\t "); /* prints level of experience */
- printf( " Getting closer to your goal. Keep up the good work!\n " ); /* prints encouraging statement*/
- }
- else if( numClass <= 2 ) /* third if else statement */
- {
- printf( " Novice\t " ); /* prints level of experience */
- printf( " You may just be starting out, but you will make it through!\n " ); /* prints encouraging statement */
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment