Answer:
void showSquare(int param){
}
Explanation:
In C++ programing language, this is how a function prototype is defined.
The function's return type (In this case Void)
The function's name (showSquare in this case)
The function's argument list (A single integer parameter in this case)
In the open and closing braces following we can define the function's before for example we may want the function to display the square of the integer parameter; then a complete program to accomplish this in C++ will go like this:
<em>#include <iostream></em>
<em>using namespace std;</em>
<em>void showSquare(int param);</em>
<em>int main()</em>
<em>{</em>
<em> showSquare(5);</em>
<em> return 0;</em>
<em>}</em>
<em>void showSquare(int param){</em>
<em>int square = param*param;</em>
<em>cout<<"The Square of the number is:"<<endl;</em>
<em>cout<<square;</em>
<em>}</em>
Answer:
No you can not tell that recursion is ever required to solve a problem.
Recursion is required when in the problem, the solution of the input depends on the solution of the subsets of the input.
Iteration is also another form of repetitive approach we follow to solve that kind of problems.
But the difference between recursion and iteration is :
- In recursion we call the function repeatedly to return the result to next level.
- In iteration certain bunch of instructions in a loop are executed until certain conditions met.
Explanation:
For example in the Fibonacci sequence problem, to find , we need to compute and before that.
- In case of recursion we just call the method Fibonacci(n) repeatedly only changing the parameter Fibonacci(n-1), that calculates the value and return it.
Fibonacci(n)
1. if(n==0 or n==1)
2. return 1.
3.else
4. return( Fibonacci(n-1)+Fibonacci(n-1) )
- But in case of iteration we run a loop for i=2 to n, within which we add the value of current and to find the value of
Fibonacci(n)
1. if(n<=2)
2. result = 1
3. else
4. result1 =1 and result2=1.
5. { result = result1 +result2.
6. result1= result2.
7. result2 = result.
8. }
9. output result.
Answer:
explanation below
Explanation:
Management controls are some of the techniques and mechanisms that can be put in place to implement security policies – which ensure information and information systems are protected. These controls are not only used by managers but can be exercised by selected users.
These controls must be put in place to cover all forms of information security, physical security and classification of those information.
<span>If a developer wanted to incorporate sounds into their works, the best application to choose would be a sound application.</span>