Difference between revisions of "Input Validation"
From CompSciWiki
Line 1: | Line 1: | ||
{{1010PrAD|ProblemName=Input Validation | {{1010PrAD|ProblemName=Input Validation | ||
− | |Problem= | + | |Problem=Prompt the user for input until they enter either a, b, or c. Use the following guidelines in coming up with a solution: |
+ | * [[https://webmail.cs.umanitoba.ca/mediawiki/index.php/Input/Output_using_JOptionPane JOptionPane for input and ouput]] | ||
+ | * [[While Loops|While loop]] for validating input | ||
|SideSectionTitle=While and For Loops | |SideSectionTitle=While and For Loops | ||
Line 8: | Line 10: | ||
[[Image:Wiki_loops03.jpg|center]]<BR> | [[Image:Wiki_loops03.jpg|center]]<BR> | ||
− | |Solution= | + | |Solution= |
+ | |||
|SolutionCode= | |SolutionCode= |
Revision as of 09:50, 8 April 2010
Back to the Program-A-Day homepage
ProblemPrompt the user for input until they enter either a, b, or c. Use the following guidelines in coming up with a solution:
|
While and For Loops | |
---|---|---|
Solution | ||
Code |