Question: Task A. (Choose the path C:UsersPublic for storing the specified files) Write a C program that: creates a file named circles.txt. fills out this file

Task A. (Choose the path C:\Users\Public for storing the specified files) Write a C program that: creates a file named circles.txt. fills out this file with 30 random numbers separated by spaces and lines o Numbers are floats and chosen randomly in the range [3,7]. o On each line there will be 3 numbers. o In total there will be 10 lines. The first two numbers on each line are x and y coordinates of a point on the surface representing a circle center. The 3rd number on each line is the value representing the radius of a circle. Therefore circles.txt contains information of 10 circles; their centers coordinations and their radiuses. After the program filled the file with random numbers. It closes it and reopens it in reading mode. At the same time it creates another file named areas.txt. It reads the numbers relating to each circle from circles.txt computes and write the area of that cicle into areas.txt. This process continues for all 10 circles. It closes both files and exits. Hints: To compute area of each circle you only need its radius. The area of circle is computed as 3.1415 * radius * radius Example of files: circles.txt areas.txt 3.09 3.24 3.96 6.78 3.77 5.20 3.46 3.92 6.18 6.31 5.67 5.04 6.40 6.35 5.09 3.17 5.82 5.76 4.61 6.93 4.70 3.39 6.88 4.93 5.47 5.06 4.95 4.41 5.36 4.28 49.26 84.95 119.98 79.80 81.39 104.23 69.40 76.35 76.97 57.55 Paste your program code to the provided LMS submission box and save/submit it.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!