Guest User

program problems

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