11.07.2015 Views

Lista 03a - DCC/UFMG

Lista 03a - DCC/UFMG

Lista 03a - DCC/UFMG

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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

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

Saved successfully!

Ooh no, something went wrong!