Game Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesGame Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 22nd, 2012, 10:41 AM
xod_s xod_s is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2012
Posts: 6 xod_s User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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? .

Reply With Quote
  #2  
Old November 23rd, 2012, 07:17 AM
Murzy Murzy is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 9 Murzy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 4 m 35 sec
Reputation Power: 0
http://en.wikipedia.org/wiki/Pseudocode

See especially the part: syntax.

It's basically code where you have the variables and so on, you just don't go into details on how certain things like printing are implemented , you can just say print "foo".

You don't need a loop for the validation - you need it to print it x times.

Code:
for i:= 1 to printTimes 
    print "Hello" firstName lastName
end for


The rest I leave up to you, because this smells like a school assignment

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesGame Development > How would I do pseudocode for this?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap