0

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! =)

3
Contributors
4
Replies
7
Views
7 Years
Discussion Span
Last Post by channasrey7
1

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.

Votes + Comments
Thank you so much for your help! I thought no one would help me! =)
1

Oh, another thing - you printed the diameter twice, but your project description asks for you to print it once.

Votes + Comments
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!!
0

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!!

0

\ Main module
START
WRITE "Input R"
read R
D=2R
A=3.14
RR
C=2
3.14*R
WRITE "D",D
WRITE "A",A
WRITE "C",C
END

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.