Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Aluno: Luiz Henrique Forino
- // Programação 1, professor Thiago PX
- program L1_Q2;
- uses crt;
- const
- horatrab = 10; //Hora trabalhada
- horaexce = 20; //Hora excedente
- hrexc = 50; // Hora excedente a 50
- var
- cpf : string;
- numhortrab : integer; //número de horas trabalhadas
- salariototal : integer;
- salarioexcedente : integer;
- begin
- textbackground (white);
- textcolor (blue);
- clrscr;
- writeln ('Digite seu CPF: ');
- readln (cpf);
- writeln ('Digite o total de horas trabalhadas; ');
- readln (numhortrab);
- if numhortrab <= hrexc then
- begin
- salariototal := numhortrab * horatrab;
- salarioexcedente :=0
- end
- else
- begin
- salarioexcedente:= (numhortrab-hrexc)* horaexce;
- salariototal:= salarioexcedente + (hrexc*10);
- end;
- writeln ('Salário total: ', salariototal, ' Salário excedente: ', salarioexcedente) ;
- readkey;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement