Program Pzim ;
var Sal, ajuste, novo_Sal:real;
Begin
write('Software de calculo de ajuste de salario!');
writeln;
write('Informe seu salario:');
read(Sal);
if(Sal<=700)then
begin
ajuste:=Sal*0.15;
novo_Sal:=Sal+ajuste;
end
else if(Sal >700)and(Sal<=1000)then
begin
ajuste:=Sal*0.12;
novo_Sal:=Sal+ajuste;
end
else if(Sal >1000)and(Sal<=1400)then
begin
ajuste:=Sal*0.08;
novo_Sal:=Sal+ajuste;
end
else
begin
ajuste:=Sal*0.05;
novo_Sal:=Sal+ajuste;
end;
write('O ajuste do salario foi de: r$ ',ajuste);
writeln;
write('O novo salario é: r$ ',novo_Sal);
End.
----------------------------------------------------------------
2º PROGRAMA - Também, Comente cada linha do código abaixo.
Program Pzim ;
var c,qtde:integer;
var total,desc,preco,valor:real;
Begin
write('Software de venda de equipamentos eletronicos!');
writeln;
c:=1;
write('informe a quantidade de produtos vendidos:');
read(qtde);
while(c<=qtde)do
begin
write('informe o valor do ',c, ' produto vendido:');
read(valor);
total:=total+valor;
c:=c+1;
end;
if(total<=100)then
begin
desc:=total*0.02;
preco:=total-desc;
end
else if(total >100)and(total<=150)then
begin
desc:=total*0.05;
preco:=total-desc;
end
else if(total>100)and(total<=150)then
begin
desc:=total*0.08;
preco:=total-desc;
end
else if(total>150)and(total<=200)then
begin
desc:=total*0.10;
preco:=total-desc;
end
else if(total>200)and(total<=300)then
begin
desc:=total*0.15;
preco:=total-desc;
end
else
begin
desc:=total*0.18;
preco:=total-desc;
end;
writeln;
write('O valor da venda é: r$ ', total);
writeln;
write('O valor do desconto é: r$ ', desc);
writeln;
write('o valor a ser pago é: r$ ', preco);
writeln;
End.