Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a complete C + + program with a f unction called arrayFun that takes an 1 D integer array of user - specified size
Write a complete C program with a f
unction called arrayFun that takes an D integer array of
userspecified size and finds the sum,
average, and largest and smallest of the numbers stored in the array.
Create an integer array and initialize it to random integers in the main f
unction.
Pass this array to arrayFun and print the results of the arrayFun operations to the monitor.
Example main f
unction that uses arrayFun:
int main
int size;
cout "How many numbers to enter? ;
cin size;
int numssize;
cout "Enter numbers: ;
forint i ; i size; i
cin numsi;
arrayFunnums size; prints sum, average, largest and smallest of elements in nums
return ;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started