Lista 03a - DCC/UFMG
Lista 03a - DCC/UFMG
Lista 03a - DCC/UFMG
- 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