-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsoal_faul.cpp
60 lines (58 loc) · 1.47 KB
/
soal_faul.cpp
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
#include <cstdio>
#include <iostream>
#include "modules/main.h"
#include "modules/saham.h"
#include "modules/matauang.h"
#include "modules/produksibarang.h"
int soal_faul(int pi, struct account *acc)
{
dolar dl;
produksi pb;
sahamm sh;
if(pi == 7) {
generatematauang(dl);
tulismatauang(dl);
bacaJawabanmatauang(dl);
if (cekJawabanmatauang(dl)) {
acc->point++;
cout << "Jawaban Anda Benar" << endl;
cout << "Anda dapat " << "1"
<< " Poin" << endl;
} else {
cout << "Salah. Yang benar " << dl.dolarr << endl;
}
cout << endl;
cout << " Total Poin anda adalah = " << acc->point << endl;
} else if (pi == 8) {
generateproduksibarang(pb);
tulisproduksibarang(pb);
bacaJawabanproduksibarang(pb);
if (cekJawabanproduksibarang(pb)) {
acc->point++;
cout << "Jawaban Anda Benar" << endl;
cout << "Anda dapat " << "1"
<< " Poin" << endl;
} else {
cout << "Salah. Yang benar " << pb.barang << endl;
}
cout << endl;
cout << " Total Poin anda adalah = " << acc->point << endl;
} else if (pi == 9) {
generatesaham(sh);
tulissaham(sh);
bacaJawabansaham(sh);
if (cekJawabansaham(sh)) {
acc->point++;
cout << "Jawaban Anda Benar" << endl;
cout << "Anda dapat " << "1" << " Poin" << endl;
} else {
cout << "Salah. Yang benar " << sh.hasil << endl;
}
cout << endl;
cout << " Total Poin anda adalah = " << acc->point << endl;
}
save_point(acc);
cout << endl;
cout << "Terima kasih" << endl;
return 0;
}