• API
• FAQ
• Tools
• Archive
SHARE
TWEET # Untitled a guest Oct 11th, 2019 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
1. program GajiKaryawan;
2.     uses crt;
3.     var
4.         gol,istri: Char;
5.         anak : Integer;
6.         nama: String;
7.         gajiA,gajiB,gajiC,
8.         istriA,istriB,istriC,
9.         anakA,anakB,anakC,total : Longint;
10.
11.
12. begin
13.     gajiA := 20000000;
14.     gajiB := 25000000;
15.     gajiC := 30000000;
16.     istriA := 5000000;
17.     istriB := 10000000;
18.     istriC := 15000000;
19.     anakA :=5000000;
20.     anakB :=10000000;
21.     anakC :=15000000;
22. writeln('Hitung Pendapatan Karyawan');
23. writeln('************************************');
25. writeln('Masukan Golongan  A, B Atau C : ');readln(gol);
27.
28. if (gol = 'A') then
29. begin
30.     if (anak >= 2) then
31.     begin
32.         total := gajiA + istriA + anakA * 2
33.      end
34.     else
35.     total := gajiA + istriA + anakA * anak;
36. end
37. else if (gol = 'B') then
38. begin
39.     if (anak >= 2) then
40.     begin
41.         total := gajiB + istriB + anakB * 2
42.      end
43.     else
44.     total := gajiB + istriB + anakB * anak;
45. end
46. else if (gol = 'C') then
47. begin
48.     if (anak >= 2) then
49.     begin
50.         total := gajiC + istriC + anakC * 2
51.      end
52.     else
53.     total := gajiC + istriC + anakC * anak;
54. end;
55.
56. writeln('Total Pendapatan : ',total);
57.
58.