sábado, 18 de outubro de 2008

Programa de LP1 dia 18/10/2008

Program Pzim ;
var
v:array[1..20]of string;
n:string;
s,p,f,g,t:real;
i:integer;
Begin
for i:=1 to 20 do
begin
writeln('Digite o seu nome');
readln(n);
writeln('Digite o salário');
readln(s);
writeln('Digite a profissão de acordo com o número');
writeln('1 - flanelinha');
writeln('2 - professor');
writeln('3 - jornaleiro');
readln(p);
if p = 1 then
begin
f:=10;
t:=(s*f)/100;
g:=s+t;
end;
if p=2 then
begin
f:=20;
t:=(s*f)/100;
g:=s+t;
end;
if p=3 then
begin
f:=30;
t:=(s*f)/100;
g:=s+t;
end;
writeln('seu salário é: ',g);
end;
End.

Nenhum comentário: