I'm a bit confused by a problem on some homework for my programming test. I'm not really understanding what the question is asking though, or how to apply it to the text file I'm supposed to be outputting from. I emailed my professor for clarification but I was hoping for some forum help?

There is a file,radius.txt, containing two numbers. The first number is a start point; for the sake of argument, let’s say it’s 0.5. The second number is the number of iterations that a table must contain; let’s agree to call this 5 for now. Now, assume the first number is a radius with which you must find the circumference and area of a circle as well as the volume of a sphere.

Create a table that does this for all iterations described in the file, assuming a user-defined iterative step. Do not assume pi to be previously defined, but do assume that it is a constant defined at 3.14159265. Use proper data types and restrict calculated output to 8 decimal places but radii to 4. Print output to a separate file,circles.txt, as well as the screen.

Sample

Input file: 0.5 5

User input:Input a step size:0.6

Output:

radius circumf area volume

0.5000 3.14159265 0.78539816 0.52359879

1.1000 6.91150398 3.80132727 5.57528028

1.7000 10.68141531 9.07920327 20.57952860

2.3000 14.45132739 16.61902787 50.96502456

2.9000 18.22123797 26.42079592 102.16041731

I created a file radius.txt and inputted the .5 and 5

I tried to use the integers i typed into the file, but i wasnt sure how to manipulate them to act as regular variable for all of my calculations. I'm very confused I would really appreciate the help.Code:#include<stdio.h> #include<math.h> int main(void) { FILE *fin *fout; float rad, iter; fin=fopen("radius.txt", "r"); fout=fopen("circles.txt"); fscanf(fin, "%f %f", &f1,&f2); printf("Input: %f %f" rad,iter); fprintf(fout, "input was %f %f", rad, iter); fclose(fin); Fclose(fout); return 0; }