Question: Modify this code: #include using namespace std; int main ( ) { const int size = 5 ; int array 1 [ size ] ;
Modify this code:
#include
using namespace std;
int main
const int size ;
int arraysize;
double avg;
double sum ;
cout "Please enter values: arrayi;
sum sum arrayi;
avg sum size;
cout "You entered: ;
int max array;
forint i ; i size ; i
cout arrayi;
ifmax arrayi
max arrayi;
cout And the maximum number entered is : max endl;
cout "The summation of the entered values is: sum endl;
cout "The average of the entered values is: avg;
e Create a function and name it as CalAvg and the function accepts two integer arguments and
return one double. The function accepts integer array and the size of the array And the
function returns the average of the entered values.
f Use your ID number digits as values stored in a two dimensional array. Write a C program
to:
a Display the two dimensional array in columns and rows. ie if your id is the
two dim array will be:
b Display the two dimensional array in columns and rows multiplied by itself. ie if your
id is The resulted output will be:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
