Buscar

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.

Essa pergunta também está no material:

AP2 - Computação I - 2016-2 - gabarito
2 pág.

Computação I Centro Federal de Educação Tecnológica Celso Suckow da FonsecaCentro Federal de Educação Tecnológica Celso Suckow da Fonseca

💡 1 Resposta

User badge image

Ed Verified user icon

A alternativa correta é a letra A) Somente as afirmações 1 e 2 estão corretas.

0
Dislike0

✏️ Responder

SetasNegritoItálicoSublinhadoTachadoCitaçãoCódigoLista numeradaLista com marcadoresSubscritoSobrescritoDiminuir recuoAumentar recuoCor da fonteCor de fundoAlinhamentoLimparInserir linkImagemFórmula

Para escrever sua resposta aqui, entre ou crie uma conta

User badge image

Outros materiais