 
          
         
               
            
| Reprompting A Programming Pattern | 
| 
                      
                     Prof. David Bernstein
                      | 
| Computer Science Department | 
| bernstdh@jmu.edu | 
 
               
             
         
             
         
          
          
         
             
         
          
         if statement to validate and re-prompt 
         
             
         
          
         while and do loops 
         
             
         
          
         do loop. In the body of the loop:
       
         
             
         
          
         while loop when the response is invalid. 
      In the body of the loop:
       
         
             
         
          
          
         
             
         
          
          
         