Computer Science, asked by reyasomaliroy29, 4 months ago

1 function power (n) {
2 if (n > 1) {
3
n = n - 1
4.
return
5 }
6 else {
7
return
8 }
9
10 print (power(6))​

Answers

Answered by skpillai636
2

Answer:

Explanation:

We recall that a power is the product of a certain number of factors, all of which are the same. For example, 37 is a power, in which the number 3 is called the base and the number 7 is called the index or exponent.

In the module, Multiples, Factors and Powers, the following index laws were established for positive integer exponents. So positive integers and , and rational numbers and , we have:

Index Laws

1

   To multiply powers with the same base, add the indices.

   aman = am+n.

2

   To divide powers with the same base, subtract the indices.

   = am − n, (provided m > n.)

3

   To raise a power to a power, multiply the indices.

   (am)n = amn.

4

   A power of a product is the product of the powers.

   (ab)m = ambm.

5

   A power of a quotient is the quotient of the powers.

   G0t2.pdfm= , (provided b ≠ 0.)

These laws also hold when a and b are real.

EXERCISE 1

Show that G0t4.pdf ÷ = 6ab5.

We now seek to give meaning to other types of exponents. The basic principle we use throughout is to choose a meaning that is consistent with the index laws above.

The Zero Index

Clearly G0t6.pdf = 1. On the other hand, applying index law 2, ignoring the condition m > n,

we have = 50. If the index laws are to be applied in this situation, then we need to define 50 to be 1.

More generally, if a ≠ 0 then we define a0 = 1.

Note that 00 is not defined. It is sometimes called an indeterminant form.

(The explanation of this term is that one can find sequences of numbers of the form ab in which both a and b approach 0, but where the limit of the sequence is not 1 and indeed can be made to be any number we like, by a suitable choice of and For example, the terms of the sequence

1, G0t8.pdf0, G0t9.pdf0, 0,…

are all equal to 1, while the terms of the sequence

01, 0G0t11.pdf, 0G0t12.pdf, 0, …

are all equal to 0. In each case the form of the terms approaches 00.

A similar situation occurs with G0t14.pdf and so the expression is also often referred to as an indeterminant form.

Answered by Anonymous
2

123

Question 1

Predict output of following program

#include <stdio.h>

int fun(int n)

{

if (n == 4)

return n;

else return 2*fun(n+1);

}

int main()

{

printf("%d ", fun(2));

return 0;

}

 \huge \bf \red}

Similar questions