Unsure, Point Distribution Task (trying to avoid messy code)

I've hit a wall. I'm not really sure how to go about handling the task I want to perform.

The person has 32 points to distribute across 7 attributes.
The base value is 10 with a modifier of (+0). It cost 1 point until the value is 14(+2). It would cost 2 points after that until 16(+3) and it would cost 3.
I'm not exactly sure how I would go about programming this without it turning into a convoluted mess. I already have 4 variables for each attribute and one for available points.

If I can be pointed in a general direction I should be able to figure this out. I would rather not just be handed code, examples of similar tasks would be great though.

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
// Part two of program.
	// Attribute Explinations.
	cout << "You will now be assigning points to your attributes. Each attribute has a default starting value. You will assign a total of thirty-two points across six attributes." << endl;
	cout << "Every so many points you will recieve a +1 to your modifier. Each modifier point (starting at +2) will require one extra point to raise the value of that attribute." << endl;
	cout << "Let's begin." << endl;

	// Attribute point distribution.
	cout << endl << "Your attributes are; Strength, Dexterity, Constitution, Intelligence, Wisdom, and Charisma. They start with a value of 10. You have a total of 32 points." << endl;
	cout << endl;
	
	// Variable declarations.
	// i = int, b = base, p = points, m = mod. base + points = display figure: isrt, idex,icon ....
	int ibsrt(10); int isrtp(0); int isrtm(0); int isrt(ibsrt + isrtp); // Strength
	int ibdex(10); int idexp(0); int idexm(0); int idex(ibdex + idexp); // Dexterity
	int ibcon(10); int iconp(0); int iconm(0); int icon(ibcon + iconp); // Constitution
	int ibitl(10); int iitlp(0); int iitlm(0); int iitl(ibitl + iconm); // Intelligence
	int ibwis(10); int iwisp(0); int iwism(0); int iwis(ibwis + iwism); // Wisdom
	int ibcha(10); int ichap(0); int icham(0); int icha(ibcha + icham); // Charisma

	int iattpl(32); //Attribute points left

	cout << "Let's start with 'Strength'. You have " << iattpl << " left." << endl << endl;
	cout << "Strength: " << isrt << "(+" << isrtm << ")";

	char c[10];
	cin.getline (c,10);
}


Thank you for taking the time to read this =) Many more thanks for a response =D
Topic archived. No new replies allowed.