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

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.

commented: Thank you so much for your help! I thought no one would help me! =) +0

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

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

\ 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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.