So for my into to computer science class I need to write a program that asks the user the radius, the height, and how many vases to make, and calculates how much material is needed for the bottom and how much material is needed for side for the number of vases requested. The formula for diameter of the circle is 2 x radius, the perimeter of the circle is 2 x ∏ x radius (use 3.14159 for ∏). This is all in C++. Can you please help me?
#Vase Calculations
1 messages · Page 1 of 1 (latest)
have you done the previous steps? drawing the vase and pseudocode?
with what exacty do you need help?
I have drawn the vase but haven't done the pseudocode. I need help with figuring out what variables I need to put down
it doesn't really help people when you just give them the code to run.
Everyone needs to learn how to debug their code, write code, and plan it out. Intro to coding classes establish those skills and practices before getting to really complex problems/projects
@silver thistle i would start with writing out the pseudocode and give it your best shot.
ok
We can help you with your pseudocode afterwards
here it so far, idk what to do
I am on mobile so I wont be able to view
I dont think i need the whole zip folder, do you have just your pseudocode
here
It looks like a reiteration of your problem/assignment.
Start with pseudocode. If you're unsure what pseudocode is, its fake code, in otherwords english descriptions step by step that plans out the structure of code. something that looks like this:
Ex. A vending machine program
START:
Options = chips, protein bar, candy, soda.
Prices = 1.20$, 1.40$, 0.50$, 1.00$
Ask user for their option
if their option is chips:
Total is 1.20$
if their option is protein bar:
total is 1.40$
if their option is candy:
total is 0.50$
if their option is soda:
total is 1.00$
Ask user for money
If money > total :
change is money - total
give user change
END
Where are you stuck? Do you understand your problem?
No I don't understand the problem
Okay first you should do the user input. What are you asking the user?
List your input
the radius, the height and how many vases to make
the output is the total for the bottom and the total for the sides
is that right?
Yes that is what it seems from my perspective
So here is my input and output I made
Input:
Asks the user the radius of the vase
Asks the user the height of the vase
Asks the user how many vases to make
Output:
Prints out the length and width of the material needed to make the bottom
Prints out the length and width of the material needed to make the side
Awesome next step is lets say you have those values how would you calculate the bottom
How much surface area does the bottom have
would it be Pi * radius^2?
I believe so
ok
Someone can correct me if I am wrong
I do think that is to calculate the bottom surface area of a circular vase
hold on let me type it out
Here's the typed out version if you can't see it:
Problem:
A manufacturing company makes metalic vases of any radius and any height. They have a bottom, but not a top. If they want to make one vase, they purchase a square of material for the bottom and laser-cut the circle from that, and another piece of material for the side, which is machine rolled to form the side.
Formula:
Diameter of circle: 2x radius
Perimeter of circle: 2x x radius
Input:
Asks the user the radius of the vase
Asks the user the height of the vase
Asks the user how many vases to make
Output:
Prints out the length and width of the material needed to make the bottom
Prints out the length and width of the material needed to make the side
Calculations:
bottomArea= Pi * radius^2
sideArea = 2 * Pi * radius
is it right?
Side area is not quite there I think because it only gives you the circumference. It doesn't look like you use height
oh
You need to calculate the area
If it is a cylinder then you'd use the formula for it
But i think that would be a question for your teacher
I think it's a cylinder

Then you need the formula for it
You need to write the pseudo code like
START
INPUT
CALC
OUTPUT
END
ok
Then translate each step into code

