Se quiser, baixe esse app ¬ Visualg, copie o código, cole, teste, altere, treine, seja feliz! Sorria! Mesmo, se o mudo fizer careta (RS!).
Exercícios
algoritmo "Melhor Aluno"
var
   TOTAL, CONTADOR: Inteiro
   
NOME, MELHOR_ALUNO: Caractere
NOTA, MAIOR_NOTA: Real
NOME, MELHOR_ALUNO: Caractere
NOTA, MAIOR_NOTA: Real
inicio
   Escreva ("Quantos alunos a turma? ")
   
Leia (TOTAL)
CONTADOR <- 1
Escreva ("O melhor aproveitamento de ", MELHOR_ALUNO, " com a nota ", MAIOR_NOTA:3:1)
Leia (TOTAL)
CONTADOR <- 1
Enquanto (CONTADOR <= TOTAL) faca
  
  Escreval ("")
  
  Escreva ("ALUNO ", CONTADOR)
  
Escreval("")
Escreva ("Nome do aluno: ")
Leia (NOME)
Escreva ("Nota de ", NOME, ": ")
Leia (NOTA)
Escreva ("")
FimEnquanto
Escreval("")
Escreva ("Nome do aluno: ")
Leia (NOME)
Escreva ("Nota de ", NOME, ": ")
Leia (NOTA)
Escreva ("")
  Se (NOTA > MAIOR_NOTA) entao
    
  CONTADOR <- CONTADOR + 1
  
    MAIOR_NOTA <- NOTA
    
MELHOR_ALUNO <- NOME
  FimSe
  MELHOR_ALUNO <- NOME
Escreva ("O melhor aproveitamento de ", MELHOR_ALUNO, " com a nota ", MAIOR_NOTA:3:1)
