This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
useEffect(() => { | |
const chatBody = chatBodyRef.current; | |
if (chatBody) { | |
const isUserScrollingUp = chatBody.scrollHeight - chatBody.scrollTop > chatBody.clientHeight + 10; | |
if (!isUserScrollingUp) { | |
chatBody.scrollTop = chatBody.scrollHeight; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Algoritmo média com se e senão | |
var | |
nota1, nota2, media : real | |
inicio | |
escreva("Digite a primeira nota") | |
leia(nota1) | |
escreva("Digite a segunda nota") | |
leia(nota2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALGORITMO soma | |
var | |
num1, num2 : inteiro | |
inicio | |
escreva("digite o primeiro numero") | |
leia(num1) | |
escreva("digite o primeiro numero") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALGORITMO EXERCICIO 15 NUMEROS INTEIROS | |
var | |
contador : inteiro | |
inicio | |
para contador 0 ate 15 passo 1 faca | |
escreva("contador-1", "contador+1", "contador*2", "contador*3") | |
fim para | |
fim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALGORITMO EXERCICIO IMPARES 100 A 200 | |
var | |
contador:inteiro | |
inicio | |
para contador de 101 ate 200 passo 2 faca | |
escreva(contador) | |
fim para | |
fim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
algoritmo media_com_repeticao | |
var | |
nota1, nota2, media : real | |
contador: inteiro | |
inicio | |
para contador de 1 ate 20 passo 1 faca | |
escreva ("digita nota 1") | |
leia(nota1) | |
escreva ("digite nota 2") | |
leia(nota2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var | |
contador : inteiro | |
inicio | |
para contador de 1 até 10 passo 1 faca | |
escreva(contador) | |
fim para | |
fim. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exercicio algoritmo media (estrutura de decisão) | |
var | |
nota1, nota2, media : real | |
inicio | |
leia(nota1) | |
leia(nota2) | |
media <- (nota1 + nota2) / 2 | |
se media >= 60 | |
então |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Código que faz parte do artigo para iniciantes em www.alexandregama.wordpress.com | |
#include<stdio.h> | |
#include<stdlib.h> | |
int main() { | |
//Declaração das variáveis para guardar os valores | |
int dividendo; | |
int divisor; | |