
November 22nd, 2012, 10:41 AM
|
|
Registered User
|
|
Join Date: Oct 2012
Posts: 6
Time spent in forums: 1 h 13 m 19 sec
Reputation Power: 0
|
|
|
How would I do pseudocode for this?
I've been told to write pseudocode that will...
-prompt the user for a first name and assign it to variable FName.
-prompt the user for a last name and assign it variable LName.
-prompt the user for a number and assign it to variable PrintTimes.
-use a looping structure for validation to check that the PrintTimes number is from 0-5.
Use a looping structure that will print "Hello FirstName LastName" according to the number of times entered by the user (PrintTimes).
And apparently in all this there is a "for loop" that plays a part by being where the decision will be at the top of the loop.
Code:
//BEGIN
//Declare and initialize variables
//Get “firstname” input
//Assign to variable FName
//Get “lastname” input
//Assign to variable LName
//Prompt for number input
//Assign to PrintTimes
//Validate with loop that the input is betwenn 0-5
//Format output for printing
//Display "Hello FirstName LastName"
//Print
//End
Could someone please give me a boost and tell me if I’m on the right track or not?  .
|