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.

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

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

Saved successfully!

Ooh no, something went wrong!