Write a program to find the area and volume of a sphere.
In this program, we calculate the area and volume of the sphere from its radius.
This post content
- Algorithm
- Flowchart
- C code
- Output
- Pdf notes
Algorithm:-
Step 1:-start.
Step 2:-declare the variables pi, r area, and volume.
Step 3:-read the variables pi and r.
Step 4:-calculate the area and volume of a sphere,
By using:-
area =4 * pi r * r.
Volume = 4/3*pi*r*r*r.
Step 5:-print area and volume.
Step 6:-end.
Flowchart:-
C code:-
Output:-
Tyr it yourself:-
Comments
Post a Comment