Answer:
Follows are the method definition to this question:
void printArray(int arrayToPrint[], int arraySize) //defining a method printArray that accepts two array in its parameters
{
for (int j = 0; j < arraySize; j++)//defining for loop print Serial numbers
{
Serial.print("[");//use print method to print square bracket
Serial.print(j);//use print method to print Serial numbers
Serial.print("]: ");//use print method to print square bracket
Serial.println(arrayToPrint[j]);//printing array value
}
}
Explanation:
In the above code, a method "printArray" is declared that holds two arrays "arrayToPrint and arraySize" as a parameter, and inside the method is used for loop to print the values.
In the loop, first, it uses the square bracket to print the serial number and in the last step, it prints array values.
The program is an illustration of built-in functions
<h3>What are
built-in functions?</h3>
They are named program statements that have a predefined purpose
<h3>The actual program</h3>
The program written in C++, where comments are used where required is as follows:
#include <iostream>
#include <cmath>
#include <ios>
#include <iomanip>
using namespace std;
int main (){
double x;
double y;
double z;
cin>>x;
cin>>y;
//This calculates the given expression
z = pow(sqrt(y),x);
cout << fixed<<setprecision(2);
cout<<z<<endl;
return 0;
}
Read more about python functions at:
brainly.com/question/14284563