# Write a program in Qbasic to find area and volume of a cylinder

Write a program in Qbasic to find area and volume of a cylinder

Welcome to the forums, @ChhotuSingh2!

It seems that this post is asking for answers to a school assignment. It is against Replit Ask policy for community members to request or post complete answers to homework-like questions. On the other hand, the community can assist you in working through and understanding the core fundamentals of computer programming to help you figure out your question by yourself, though.

2 Likes

Hello @ChhotuSingh2 and welcome to the community!

As @NateDhaliwal said we cannot give you the actual answer but we can help you through the journey!

• What is the actual formula?

The area of a cylinder that you want to calculate is a surface area. The formula for the total surface area is `A=2Ï€.r(r+h)`. And the volume of a cylinder is `V=Ï€.rÂ²h`.

That being said you will need to accept user input (to enter the radius and height of the cylinder).

Perform the calculations using the input values and display the results.

When youâ€™re writing your program remember to:

1. Declare any variables you need.
2. Use INPUT statements to get the values from the user.
3. Calculate the area and volume (storing them).
4. Use PRINT to display the results.

You can add a error checking if you like.

Good luck!

3 Likes