c++ question
QUESTION 1 Write C++ program to store and manipulate radiuses of 200 spheres. The program must have the following functions: a) Function float avgRadius (float arr [], int size) to calculate and return the average radius in the array. b) Function void SwapValue (float &arrl, float &arr2) that receives two positions of an array. The function will swap the value of the two array positions. c) Main program to declare and store different radius values of spheres from user inputs. Then, call the above two functions and display the information as the following: Radius of Spheres Sphere No 1 2 : 199 200 Radius X.X X.X XLX X.X Average of radius: y.y The position of minimum radius: a The position of maximum radius:b After swap value The position of minimum radius: b The position of maximum radius:a
c++ question
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am