why is the next part couldnt show?

This code should show Tunjangan, Potongan Iuran, and Gaji Bersih. But, when I clicked this code always stop at gaji pokok. Is there anyone know what wrong with my code? Pls help me :( Thank you


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <windows.h>
#include<cmath>
#include<iomanip>
#include<conio.h>

using namespace std;

int main ()
 {
	char status[10];
	char golongan[10];
	char namakaryawan[10];
	
	cout << "Nama Karyawan";
	cin>>namakaryawan;
	cout <<"\n Golongan\n";
	cin>>golongan;
	cout<<"\n Status (Nikah\Belum)\n";
	cin>>status;

	double potongan_iuran,gaji_pokok,tunjangan,prosentase,gaji_bersih;
	
		
	
		
	if (("A",golongan)&&("Belum",status))
	{
           cout << "Gaji pokok:"<<"2000000";cin>>setprecision(7)>>fixed>>gaji_pokok;
           cout << "Tunjangan:"<<"50000";cin>>setprecision(5)>>fixed>>tunjangan;
           prosentase=0,05;
           gaji_bersih=gaji_pokok+tunjangan-potongan_iuran;
           potongan_iuran=(gaji_pokok+tunjangan)*prosentase;
        	cout << "Potongan Iuran:"<<potongan_iuran<<endl;
           cout	<<"Gaji Bersih:"<<gaji_bersih<<endl;
       
       
    }
    	if ( ("A",golongan)&&("Nikah",status))
	{
           cout << "Gaji pokok: "<<"2000000";cin>>setprecision(7)>>fixed>>gaji_pokok;
           cout << "Tunjangan: "<<"100000";cin>>setprecision(6)>>fixed>>tunjangan;
           prosentase=0,05;
           gaji_bersih=gaji_pokok+tunjangan-potongan_iuran;
           potongan_iuran=(gaji_pokok+tunjangan)*prosentase;
           cout << "Potongan Iuran:"<<potongan_iuran<<endl;
           cout	<<"Gaji Bersih:"<<gaji_bersih<<endl;
       
       
    }
    	if ( ("B",golongan)&&("Belum",status))
	{
           cout << "Gaji pokok: "<<"3000000";cin>>setprecision(7)>>fixed>>gaji_pokok;
           cout << "Tunjangan: "<<"110000";cin>>setprecision(6)>>fixed>>tunjangan;
           prosentase=0,1;
           gaji_bersih=gaji_pokok+tunjangan-potongan_iuran;
           potongan_iuran=(gaji_pokok+tunjangan)*prosentase;
           cout << "Potongan Iuran:"<<potongan_iuran<<endl;
           cout	<<"Gaji Bersih:"<<gaji_bersih<<endl;
       
    }
    
    

	else
	
           cout << "Gaji pokok: "<<"3000000";cin>>setprecision(6)>>fixed>>gaji_pokok;
           cout << "Tunjangan: "<<"150000";cin>>setprecision(5)>>fixed>>tunjangan;
           prosentase=0,1;
           gaji_bersih=gaji_pokok+tunjangan-potongan_iuran;
           potongan_iuran=(gaji_pokok+tunjangan)*prosentase;
           cout <<"Potongan Iuran:"<<potongan_iuran<<endl;
           cout	<<"Gaji Bersih:"<<gaji_bersih<<endl;
       
       

	system("pause");
	return 0;
}
Last edited on
if (("A",golongan)&&("Belum",status))

This makes no sense at all.
could you please kindly show me how to fix this one instead of just telling me that doesnt make sense pls? :')
Could you tell us what you're trying to do with that line?
Topic archived. No new replies allowed.