Tips for this program?

This isn't asking for any certain instruction or anything. I can compile this program fine as it is (it isn't finished just doesn't have any bugs right now)

Just wondering what I can do to have this wrote out more efficiently etc. other than that I used system("PAUSE"); at the end. It's just a little text based game I'm making to get familiar with the most basic syntax.

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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165

#include<iostream>
#include<string>

using namespace std;

int main()
{
	int baseIntellect;
	int baseWisdom;
	int baseStrength;
	int baseAthletics;
	int baseAcrobatics;
	int baseStealth;
	int baseWealth;
	int baseSpeech;
	int baseMagic;
	int baseSwordsmanship;
	int baseArchery;
	cout << "Welcome to Tyrmir! Before you play";
	cout << endl; 
	cout << "please read these instructions.";
	cout << endl;
	cout << "----------------- ";
	cout << endl;
	cout << "Make sure you make choices correctly!";
	cout << endl;
	cout << "Example: 1. Go into the cave";
	cout << endl;
	cout << "Example: 2. Run away";
	cout << endl;
	cout << "You must enter number 1 or 2, otherwise";
	cout << endl;
	cout << "the program will crash";
	cout << endl;
	cout << "There is no saving your game, to complete";
	cout << endl;
	cout << "the game you have to play it all the way through";
	cout << endl;
	cout << "without closing the program";
	cout << endl;
	cout << "This game has no graphics, it is TEXTUAL BASED";
	cout << endl;
	cout << "------------";
	cout << endl;
	cout << "You awaken, you've been stuck in this dungeon";
	cout << endl;
	cout << "for ages. What do you miss most?";
	cout << endl;
	cout << "1. I miss my work as a scholar and a mage";
	cout << endl;
	cout << "2. I mis wrestling and being a warrior";
	cout << endl;
	cout << "3. I miss hunting and being a good scout";
	cout << endl;
	int choice1;
	cin >> choice1;
	if (choice1 == 1)
	{
		cout << "You're perhaps not a well rounded being,";
		cout << endl;
		cout << "but you are very talented at what you know";
		cout << endl;
		cout << "and magic is a very multi-purpose talent";
		cout << endl;
		baseIntellect = 15;
		baseWisdom = 15;
		baseStrength = 5;
		baseAthletics = 5;
		baseAcrobatics = 5;
		baseStealth = 10;
		baseWealth = 1;
		baseSpeech = 10;
		baseMagic = 20;
		baseSwordsmanship = 1;
		baseArchery = 1;
	}
	if (choice1 == 2)
	{
		cout << "You are rounded in honest skills, best to";
		cout << endl;
		cout << "fight up close and personal!";
		cout << endl;
		baseIntellect = 5;
		baseWisdom = 10;
		baseStrength = 15;
		baseAthletics = 15;
		baseAcrobatics = 5;
		baseStealth = 5;
		baseWealth = 1;
		baseSpeech = 5;
		baseMagic = 1;
		baseArchery = 5;
		baseSwordsmanship = 20;
	}
	if (choice1 == 3)
	{
		cout << "You're a rounded fellow, but don't mistake mages as dumber";
		cout << endl;
		cout << "and don't underestimate a warrior when up close";
		cout << endl;
		baseIntellect = 10;
		baseWisdom = 5;
		baseStrength = 5;
		baseAthletics = 10;
		baseAcrobatics = 15;
		baseStealth = 15;
		baseWealth = 1;
		baseSpeech = 10;
		baseMagic = 1;
		baseSwordsmanship = 5;
		baseArchery = 20;
	}
	cout << "Look at your strengths and weaknesses";
	cout << endl;
	cout << "The outcome of your choices depends on them";
	cout << endl;
	cout << "Avoid situations that require skills you lack";
	cout << endl;
	cout << ".";
	cout << endl;
	cout << "Intellect-" << baseIntellect << endl;
	cout << "Wisdom-" << baseWisdom << endl;
	cout << "Strength-" << baseStrength << endl;
	cout << "Athletics-" << baseAthletics << endl;
	cout << "Acrobatics-" << baseAcrobatics << endl;
	cout << "Stealth-" << baseStealth << endl;
	cout << "Wealth-" << baseWealth << endl;
	cout << "Speech-" << baseSpeech << endl;
	cout << "Magic-" << baseMagic << endl;
	cout << "Swordsmanship-" << baseSwordsmanship << endl;
	cout << "Archery-" << baseArchery << endl;
	cout << "."; 
	cout << endl;
	cout << "Your stats will be shown after every choice you make"; 
	cout << endl;
	cout << " ";
	cout << endl;
	cout << "You are in prison, are and as you know for no crime";
	cout << endl;
	cout << "You were serving under the army of Tyrmir";
	cout << endl;
	cout << "You ran into some trouble after a peasant ran by";
	cout << endl;
	cout << "and dropped a bag of jewelry at your feet";
	cout << endl;
	cout << "Next thing you knew you were in prison for treason";
	cout << endl;
	cout << "Fortuanetly, your uncle is the Baron of Voldukt,";
	cout << endl;
	cout << "he wasn't able to bribe you out, but he can brute force it.";
	cout << endl;
	cout << "However, you need to recollect your thoughts";
	cout << endl;
	cout << "What is your name?";
	cout << endl;
	cout << ".";
	cout << endl;
	string pname;
	cin >> pname;
	cout << "You have a long road ahead of you " << pname << endl;
	system("PAUSE");
	return 0;
}
Rather than using if every time you can use,
1
2
3
4
5
6
7
8
9
10
11
12
if(choice == 1)
{

}
else if(choice == 2)
{

}
else if(choice == 3)
{

}

This will save you time and it's more efficient.
Topic archived. No new replies allowed.