11.07.2015 Views

Lista 03a - DCC/UFMG

Lista 03a - DCC/UFMG

Lista 03a - DCC/UFMG

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

7) Escreva um algoritmo em PORTUGOL que imprima todos os números pares dointervalo fechado de 1 a 100.algoritmo L3P007;varinteiro: C;iníciopara C de 2 até 100 passo 2 façaimprima(C);fim-parafimprogram l3p007;varC: integer;beginfor C := 2 to 100 doif ( C mod 2 = 0) thenwriteLn(C);end.for C = 2 : 100if ( mod( C , 2 ) == 0)disp( C );endend<strong>UFMG</strong> – ICEx – <strong>DCC</strong> – Programação de Computadores – 2º. Sem 2005 – David Menoti 7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!