回答編集履歴
1
追記
test
CHANGED
@@ -11,3 +11,69 @@
|
|
11
11
|
for (i = 0; i<4; i++)
|
12
12
|
|
13
13
|
```
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
分かり辛かったですか、すみません。ちょっと範囲を拡大して
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
```ここに言語を入力
|
22
|
+
|
23
|
+
else
|
24
|
+
|
25
|
+
{
|
26
|
+
|
27
|
+
flag = 0; //こことか***********************************************
|
28
|
+
|
29
|
+
for (i = 0; i<4; i++)
|
30
|
+
|
31
|
+
{
|
32
|
+
|
33
|
+
if (name == dest[i].name)
|
34
|
+
|
35
|
+
{
|
36
|
+
|
37
|
+
flag = 1; /*When the destinations are above four cities*/
|
38
|
+
|
39
|
+
cout << "Round trip? [Y/N]";
|
40
|
+
|
41
|
+
cin >> roundtrip;
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
if (roundtrip == 'y')
|
46
|
+
|
47
|
+
total = total + (1.6*dest[i].price);
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
else
|
52
|
+
|
53
|
+
total = total + dest[i].price;
|
54
|
+
|
55
|
+
cout << "Student discount? [Y/N]";
|
56
|
+
|
57
|
+
cin >> discount;
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
if (discount == 'y')
|
62
|
+
|
63
|
+
total = total - (dest[i].price*.20);
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
ticket = ticket + 1;
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
break;
|
72
|
+
|
73
|
+
}
|
74
|
+
|
75
|
+
}
|
76
|
+
|
77
|
+
}
|
78
|
+
|
79
|
+
```
|