c++ question

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

c++ question

Post by answerhappygod »

c++ question
C Question 1
C Question 1 (149.93 KiB) Viewed 25 times
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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply