Guest User

Untitled

a guest
Jan 22nd, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.23 KB | None | 0 0
  1. #include "stdio.h"
  2.  
  3. /* current problems */
  4. /* program builds, but hangs after user input */
  5.  
  6.  
  7.  
  8. int main( void ) /* begin program */
  9.  
  10. {
  11.  
  12.     int numClass = 0; /* initilize variable numClass, # of classes taken by end-user and defines initial value as 0 */
  13.  
  14.         printf(" How many Technical Classes have you taken?\n " ); /* asks user to input number of classes taken */
  15.         scanf(" %d\n ", &numClass ); /* take input rom user and assign it to the numClass variable */
  16.  
  17.             if( numClass >= 6 ) /* first if else statement */
  18.  
  19.             {
  20.                 printf( " Experienced\t "); /* prints level of experience */
  21.                 printf( " Great job. Keep at it, there is always more to learn!\n " ); /* prints encouraging statement*/
  22.             }
  23.  
  24.             else if(( numClass >= 3 ) && (numClass <= 5 )) /* second if else statement */
  25.  
  26.             {
  27.                 printf( " Intermediate\t "); /* prints level of experience */
  28.                 printf( " Getting closer to your goal. Keep up the good work!\n " ); /* prints encouraging statement*/
  29.             }
  30.  
  31.             else if( numClass <= 2 ) /* third if else statement */
  32.  
  33.             {
  34.                 printf( " Novice\t " ); /* prints level of experience */
  35.                 printf( " You may just be starting out, but you will make it through!\n " ); /* prints encouraging statement */
  36.             }
  37.  
  38. return 0;
  39. }
Add Comment
Please, Sign In to add comment