Listing :
1.
# include "stdio.h"
2.
# include "conio.h"
3.
main ()
4.
{
5.
int jumlahanak;
6.
float gajikotor, tunjangan,
persetunjangan=0.2;
7.
clrscr ();
8.
printf ("
---------------------------------\n");
9.
printf ("[ Program Tunjangan ]\n");
10. printf ("
---------------------------------\n");
11. printf ("\nGaji kotor : ");
12. scanf
("%f", &gajikotor);
13. printf ("\nJumlah anak : ");
14. scanf
("%i", &jumlahanak);
15. if (jumlahanak>2) persetunjangan=0.3;
16. tunjangan = gajikotor * persetunjangan;
17. printf
("___________________________________\n");
18. printf ("\nBesarnya tunjangan:
Rp.%10.2f\n",tunjangan);
19. printf
("-----------------------------------");
20. getch ();
21. return 0;
22. }
0 komentar:
Posting Komentar