My third day of learning C. I wrote this simple program to practice how to use the math.h library and handle user input.
The program takes a radius value from the user and calculates:
Area of a circle Circumference of a circle Surface area of a sphere Volume of a sphere
Used double for precision.
Added a basic if check to prevent negative radius inputs.
Used pow() for calculations.
Note for Linux users: Compile with -lm to link the math library.