Mudanças entre as edições de "PR1022804 2021 1 AULA06b"

De MediaWiki do Campus São José
Ir para navegação Ir para pesquisar
Linha 22: Linha 22:
 
;Questão 4
 
;Questão 4
  
:
+
:Execute o código:
 +
 
 +
<syntaxhighlight lang=c>
 +
#include <stdio.h>
 +
 
 +
int main()
 +
{
 +
    int x=5, y=3, z=1;
 +
    printf("\n (x*(y+z)/2)==%d", (x*(y+z)/2) );
 +
    printf("\n (x%%y+(11%%y))==%d", (x%y+(11%y)) );
 +
    printf("\n (5-(x/(z+1)-y))==%d", (5-(x/(z+1)-y)) );
 +
    printf("\n (x/y/z*-1)==%d", (x/y/z*-1) );
 +
    return 0;
 +
}
 +
</syntaxhighlight>
  
  

Edição das 11h50min de 15 de julho de 2021

Correção da AT1

Gabarito: https://wiki.sj.ifsc.edu.br/index.php/Arquivo:Gabarito_-_PR1022804_2021_1_AT1.pdf


Por que as questões são FALSAS?
Questão 1
a) O texto diz respeito a pseudocódigo não a fluxograma.
d) Uma receita é um algoritmo.
Questão 2
b) O texto se refere a entradas não a saídas.
d) O computador não faz tudo sozinho.
Questão 3
a), b) e c) Não são a ordem correta.
Questão 4
Execute o código:
#include <stdio.h>

int main()
{
    int x=5, y=3, z=1;
    printf("\n (x*(y+z)/2)==%d", (x*(y+z)/2) );
    printf("\n (x%%y+(11%%y))==%d", (x%y+(11%y)) );
    printf("\n (5-(x/(z+1)-y))==%d", (5-(x/(z+1)-y)) );
    printf("\n (x/y/z*-1)==%d", (x/y/z*-1) );
    return 0;
}



Icone voltar.png Icone menu.png Icone prox.png