Consider the following code:
1. The function 'Real soma(Inteiro n)' returns the sum of the expression '(i+1) / (n-i)' for i = 0 to n-1.
2. The seco...
Consider the following code: 1. The function 'Real soma(Inteiro n)' returns the sum of the expression '(i+1) / (n-i)' for i = 0 to n-1. 2. The second question is invalid due to a missing 'Fim Se' statement. 3. The function 'Inteiro diferencaMatriz(Inteiro[][] matriz, Inteiro m, Inteiro n)' returns the difference between the sum of even numbers and the sum of odd numbers in a matrix of size m x n. 4. The procedure 'calcVar(Real[] Dados, Inteiro N)' calculates the variance of a distribution given an array of data and its size.
a) Only statements 1 and 2 are correct. b) Only statements 2 and 3 are correct. c) Only statements 3 and 4 are correct. d) All statements are correct.
Compartilhar