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:)
Answer:
D. Totals
Explanation:
Just like the microsoft excel spreadsheet, the microsoft access datasheet has similar tools. Although it is used to create and query databases, some functions carried out is excel can be done in access as well.
In the status bar at the bottom of the screen, certain parameter can be displayed for easy reference. If the totals or other statistical values needs to be included in the bottom status bar, go to the home tab and click on the "Totals" button.
<span>Unidad de lógica aritmética</span>
Answer:
It depends on the situation
import "from random import randrange"
for printing random numbers between integers "random.randrange(num1, num2"
Syntax:
"random.randrange(start, stop, step)"
Parameter Values:
start - optional - an integer defining which position to start - default = 0
stop - required - an integer defining which position to end.
step - optional - an integer define the incrementation - default = 1
Explanation:
The syntax is a bit weird but I hope I was a help