I am new to c programming and I cannot understand the teacher for the life of me. It becomes very difficult to learn this stuff even just by reading. I'd greatly appreciate any help...

The program asks for the user to input the radius and height of a right
cylinder. It then calculates surface area and volume of this cylinder
and prints the out-put on the screen in the FORMAT GIVEN BELOW. The
main program calls following three functions to accomplish the above job.
calc_area (double rad, double height)
calc_volume (double rad, double height)
and
print_info (void)

II. Helpful Math Hints:
Surface area = 2*PI*r*h + PI*r*r; and volume = PI * r*r*h

III. Helpful Programming Hints:

1. Preprocessor define PI= 3.14159
2. Declare PROTOTYPE FUNCTIONS shown above with proper return
parameters.
3. Define the three programs mentioned above, in region out-side your
main program.
3. Declare variables r, d, h, V, A as “double”.
4. Ask user to enter r in centimeters, read the value and assign to r;
ask to enter h in cms, read the value (scan in lf format) and assign
to h.
5. Call the three programs, assigning their return values
appropriately.
6. Using the results print the out-put.

IV: Output to the screen in the format:
__________________________________________________ ________________________

Enter diameter in centimeters: 3
Enter height in centimeters: 5

A right circular cylinder with a diameter = 3.00 cm and a height = 5.00
cm
will have a volume and surface area

VOLUME SURFACE AREA
------------------------------------------------------

35.3429 cu_cm 61.2610 sq_cm
Press any key to continue

Where do I even begin?!?

To begin solving this problem, let's break it down step by step:

Step 1: Preprocessor Definition

Define PI as 3.14159 using a preprocessor directive. Add the following line at the beginning of your program:
#define PI 3.14159

Step 2: Function Prototypes

Declare the following function prototypes before the main function:
double calc_area(double rad, double height);
double calc_volume(double rad, double height);
void print_info();

Step 3: Declare Variables

Declare the following variables before the main function:
double r, d, h, V, A;

Step 4: User Input

Ask the user to enter the diameter in centimeters. Read the value and assign it to the variable d. Then, calculate the radius (r) using the formula: r = d / 2.0.

Ask the user to enter the height in centimeters. Read the value and assign it to the variable h.

Step 5: Function Calls

Call the calc_area function and assign its return value to the variable A: A = calc_area(r, h).

Call the calc_volume function and assign its return value to the variable V: V = calc_volume(r, h).

Step 6: Print Output

Call the print_info function to print the output. Implement the function print_info as follows:

void print_info()
{
printf("A right circular cylinder with a diameter = %.2lf cm and a height = %.2lf cm\n", d, h);
printf("will have a volume and surface area\n\n");
printf("VOLUME\t\tSURFACE AREA\n");
printf("------------------------------------------------------\n");
printf("%.4lf cu_cm\t%.4lf sq_cm\n", V, A);
printf("Press any key to continue\n");
}

Step 7: Call the Functions

Finally, call the functions in the appropriate order in the main function:

int main()
{
// Step 1: Preprocessor Definition

// Step 2: Function Prototypes

// Step 3: Declare Variables

// Step 4: User Input

// Step 5: Function Calls

// Step 6: Print Output

return 0;
}

This should help you get started with the program. Let me know if you have any questions or need further assistance!

Don't worry, I'm here to help you. Let's break it down step by step:

1. Start by understanding the problem statement and the requirements.
- In this program, you need to calculate the surface area and volume of a right circular cylinder using the given formulas.
- The program should ask the user to input the radius and height of the cylinder.
- Then, it should calculate and display the surface area and volume in a specific format.

2. Familiarize yourself with the required formulas:
- Surface area of a cylinder: `2 * PI * r * h + PI * r * r`
- Volume of a cylinder: `PI * r * r * h`

3. Define the necessary preprocessor directives and variables:
- Define `PI` as a constant with the value `3.14159`.
- Declare variables `r`, `h`, `V`, and `A` as `double` (to store radius, height, volume, and surface area).

4. Ask the user to input the radius and height of the cylinder:
- Use `printf` to prompt the user to enter the diameter (which we will halve to get the radius) and the height of the cylinder.
- Use `scanf` to read the values entered by the user and assign them to variables `r` and `h`, respectively.

5. Define the three functions:
- `calc_area` calculates the surface area using the given formula and returns the result.
- `calc_volume` calculates the volume using the given formula and returns the result.
- `print_info` prints the output in the specified format.

6. In the main program, call the three functions and assign their return values appropriately:
- Call `calc_area` and assign the result to `A`.
- Call `calc_volume` and assign the result to `V`.

7. Print the output in the specified format using the `print_info` function:
- Use `printf` to print the header and the formatted values of the diameter, height, volume, and surface area.

8. Test your program:
- Compile and run the program.
- Enter the values for the diameter and height when prompted to see the output in the specified format.

Remember that during each step, you can refer to C programming resources or ask for specific help if you encounter any difficulties.