What is the output of the 'fatorial_e_primo' algorithm in question 4 when the user inputs the number 5?
a) O fatorial do número é: 5
b) O fatoria...
What is the output of the 'fatorial_e_primo' algorithm in question 4 when the user inputs the number 5?
a) O fatorial do número é: 5 b) O fatorial do número é: 120 c) O fatorial do número é: 1 d) An error occurs because the algorithm does not check if the input number is prime.
O algoritmo 'fatorial_e_primo' não tem como saída a informação sobre o fatorial do número, apenas se ele é primo ou não. Portanto, a resposta correta é a alternativa d) "Ocorre um erro porque o algoritmo não verifica se o número de entrada é primo".
0
0
Faça como milhares de estudantes: teste grátis o Passei Direto
Compartilhar