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.

% N, C, ATUAL, ANT1, ANT2: integer;N = input('Digite o numero de termos: ');ANT2 = input('Digite o primeiro termo: ');ANT1 = input('Digite o segundo termo: ');disp(ANT2);disp(ANT1);for C = 3 : Nif ( mod(C,2) == 1 )ATUAL = ANT1 + ANT2; % eh imparelseATUAL = ANT1 - ANT2; % eh parenddisp(ATUAL);ANT2 = ANT1;ANT1 = ATUAL;end<strong>UFMG</strong> – ICEx – <strong>DCC</strong> – Programação de Computadores – 2º. Sem 2005 – David Menoti 44

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

Saved successfully!

Ooh no, something went wrong!