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.

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

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

Saved successfully!

Ooh no, something went wrong!