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.

11) Escreva um algoritmo em PORTUGOL que receba dez números do usuário e imprimaa metade de cada número.algoritmo L3P011;varinteiro: C;real: VALOR, METADE;iníciopara C de 1 até 10 façaleia(VALOR);METADE ← VALOR / 2;imprima(METADE);fim-parafimprogram l3p011;varC: integer;VALOR, METADE: real;beginfor C := 1 to 10 dobeginwrite('Digite um valor: ');readLn(VALOR);METADE := VALOR / 2;writeLn(METADE:3:2);end;end.for C = 1 : 10VALOR = input('Digite um valor: ');METADE = VALOR / 2;disp( METADE );end<strong>UFMG</strong> – ICEx – <strong>DCC</strong> – Programação de Computadores – 2º. Sem 2005 – David Menoti 11

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

Saved successfully!

Ooh no, something went wrong!