Answer:
#include <iostream>
#include <stdlib.h>
#include <time.h>
using namespace std;
// array fill and returnig array to the main()
float *arrayFill(float *arr) {
// srand() allows generate new random value everytime the program runs
srand(time(NULL));
for (int i = 0; i < 10; i++)
{
// array fill with random number between 0 to 100
arr[i] = (rand() % 100);
}
return arr;
}
// print array
void print(float* arr) {
cout << "Array: ";
for (int i = 0; i < 10; i++)
{
cout << arr[i] << " ";
}
}
float maxNum(float* arr) {
float temp = arr[0];
for (int i = 1; i < 10; i++) {
if (temp < arr[i]) {
temp = arr[i];
}
}
return temp;
}
int main() {
// creating dynamic array of elements 10 in heap memory
float *arrPtr = new float[10];
float result = 0;
// calling arrayFill()
arrPtr = arrayFill(arrPtr);
// calling print() to print array
print(arrPtr);
// calling maxNum() to find maximum number in the array
result = maxNum(arrPtr);
cout << "\nmaximum number: " << result;
delete[] arrPtr;
return 0;
}
Explanation:
please read inline comments inside the code section:)
For microsoft word, press 'select' in upper right corner then 'select all'
Answer:
<h3>Click the chart , and then click the Chart design tab . Click Add Chart Element > Legend. To change the position of the , legend, choose Right, Top, Left or Bottom. To change the format of the legend,click more Legend options, and then make the format changes that you want.</h3>
<h2>Hope this helps you</h2>
Two different Operating Systems are
Windows 7
LINUX
Explanation:
- Windows is an Operating System which was released by Microsoft to be used on Personal Computers.
- They are used to manage software and perform various tasks.
- LINUX is another type of operating system that is used on Super computers
- Linux has been used in homes and organisation desktops in a great number.
- It is used for great number of computing embedded tasks.
Answer:
1. 5
2. Because they let us quickly process the contents of an array, which have many values.
Explanation: