PLEASE help me with this pseudocode problem!!!!

Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
Thread Solved

Join Date: Oct 2009
Posts: 2
Reputation: OrangeNaa is an unknown quantity at this point 
Solved Threads: 0
OrangeNaa OrangeNaa is offline Offline
Newbie Poster

PLEASE help me with this pseudocode problem!!!!

 
0
  #1
Oct 8th, 2009
I'm totally stuck on this problem for homework::
*** Write pseudocode to represent the logic of a program that allows the user to enter values that represent the radius of a Circle. The Program calculates the Diameter (by multiplying the Radius by 2) and then calculates the Circumference (by multiplying the Diameter by 3.14). The program prints both the Diameter and Circumference.***


This stuff is kinda confusing to me and my class book isn't helping me much. This is what I've come up with, but it looks wrong to me but I don't know which parts are and what I should fix or change::::


Start
input radius
compute diameter as radius times 2
print diameter
circumference = diameter times 3.14
print diameter, circumference
end



Btw, THANK YOU to all who helps me! =)
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 1,597
Reputation: BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all 
Solved Threads: 202
BestJewSinceJC BestJewSinceJC is offline Offline
Posting Virtuoso
 
1
  #2
Oct 9th, 2009
It looks ok to me. Pseudocode doesn't really have a "standard" format (that I know of) - if an experienced programmer were writing that pseudocode, it would look a bit different - but I think you covered most of the steps, which is the important thing. A program wouldn't just "input radius" though. You need to prompt the user first, asking them to input the radius, then you need to read that value into the radius variable.
Out.
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 1,597
Reputation: BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all BestJewSinceJC is a name known to all 
Solved Threads: 202
BestJewSinceJC BestJewSinceJC is offline Offline
Posting Virtuoso
 
1
  #3
Oct 9th, 2009
Oh, another thing - you printed the diameter twice, but your project description asks for you to print it once.
Out.
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 2
Reputation: OrangeNaa is an unknown quantity at this point 
Solved Threads: 0
OrangeNaa OrangeNaa is offline Offline
Newbie Poster
 
0
  #4
Oct 15th, 2009
Thank you very much for the help!! Not only did you really help me out, but you came back and made sure you gave me the correct evaluation! It's very appreciated=) Take care!!
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC