Advertisement
henriqueforino

AULA 10 DE SETEMBRO

Sep 10th, 2014
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.61 KB | None | 0 0
  1. // PROGRAMA PARA CALCULAR IDADE ATUAL DA PESSOA E QUANTOS ANOS ELA TERÁ EM 2014
  2.  
  3. Program AULA_10_SETEMBRO ;
  4. var nascimento, anoatual, idadefutura, idadeatual: integer;
  5.  
  6.  Begin
  7.    
  8.     textbackground (red);
  9.     textcolor (yellow);
  10.      clrscr;
  11.        
  12.     writeln ('Digite o ano do seu nascimento: ');
  13.     readln (nascimento);
  14.     writeln ('Digite em que ano você está: ');
  15.     readln (anoatual);
  16.    
  17.     idadeatual:= (anoatual - nascimento);
  18.     idadefutura:= (2050 - nascimento);
  19.    
  20.     writeln ('Atualmente, você tem ', idadeatual, ' anos. No ano de 2050, você terá ', idadefutura,' anos.' );
  21.     readln;
  22.  
  23.  End.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement