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
|
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <random>
using namespace std;
int main() {
srand((unsigned) time(0));
int RN1, RN2, RN3, RN4, totSTR, RN5, RN6, RN7, RN8, totDEX, RN9, RN10, RN11, RN12, totINT, RN13, RN14, RN15, RN16, totCON, RN17, RN18, RN19, RN20, totCHA, RN21, RN22, RN23, RN24, totWIS;
for (int index = 0; index < 1; index++) {
RN1 = (rand() % 6) + 1;
RN2 = (rand() % 6) + 1;
RN3 = (rand() % 6) + 1;
RN4 = (rand() % 6) + 1;
int lowest;
lowest = 0;
if (RN1 < RN2, RN3, RN4) RN1 = lowest;
else if (RN2 < RN1, RN3, RN4) RN2 = lowest;
else if (RN3 < RN1, RN2, RN4) RN3 = lowest;
else if (RN4 < RN1, RN2, RN3) RN4 = lowest;
totSTR = RN1 + RN2 + RN3 + RN4;
for (int index = 0; index < 1; index++) {
RN5 = (rand() % 6) + 1;
RN6 = (rand() % 6) + 1;
RN7 = (rand() % 6) + 1;
RN8 = (rand() % 6) + 1;
int lowest2;
lowest2 = 0;
if (RN5 < RN6, RN7, RN8) RN5 = lowest2;
else if (RN6 < RN5, RN7, RN8) RN6 = lowest2;
else if (RN7 < RN5, RN6, RN8) RN7 = lowest2;
else if (RN5 < RN6, RN6, RN7) RN8 = lowest2;
totDEX = RN5 + RN6 + RN7 + RN8;
for (int index = 0; index < 1; index++) {
RN9 = (rand() % 6) + 1;
RN10 = (rand() % 6) + 1;
RN11 = (rand() % 6) + 1;
RN12 = (rand() % 6) + 1;
int lowest3;
lowest3 = 0;
if (RN9 < RN10, RN11, RN12) RN9 = lowest3;
else if (RN10 < RN9, RN11, RN12) RN10 = lowest3;
else if (RN11 < RN9, RN10, RN12) RN11 = lowest3;
else if (RN12 < RN9, RN10, RN11) RN12 = lowest3;
totINT = RN9 + RN10 + RN11 + RN12;
for (int index = 0; index < 1; index++) {
RN13 = (rand() % 6) + 1;
RN14 = (rand() % 6) + 1;
RN15 = (rand() % 6) + 1;
RN16 = (rand() % 6) + 1;
int lowest4;
lowest4 = 0;
if (RN13 < RN14, RN15, RN16) RN13 = lowest4;
else if (RN14 < RN13, RN15, RN16) RN14 = lowest4;
else if (RN15 < RN13, RN14, RN16) RN15 = lowest4;
else if (RN16 < RN13, RN14, RN15) RN16 = lowest4;
totCON = RN13 + RN14 + RN15 + RN16;
for (int index = 0; index < 1; index++) {
RN17 = (rand() % 6) + 1;
RN18 = (rand() % 6) + 1;
RN19 = (rand() % 6) + 1;
RN20 = (rand() % 6) + 1;
int lowest5;
lowest5 = 0;
if (RN17 < RN18, RN19, RN20) RN17 = lowest5;
else if (RN18 < RN17, RN19, RN20) RN18 = lowest5;
else if (RN19 < RN18, RN17, RN20) RN19 = lowest5;
else if (RN20 < RN17, RN18, RN19) RN20 = lowest5;
totCHA = RN17 + RN18 + RN19 + RN20;
for (int index = 0; index < 1; index++) {
RN21 = (rand() % 6) + 1;
RN22 = (rand() % 6) + 1;
RN23 = (rand() % 6) + 1;
RN24 = (rand() % 6) + 1;
int lowest6;
lowest6 = 0;
if (RN21 < RN22, RN23, RN24) RN21 = lowest6;
else if (RN22 < RN21, RN23, RN24) RN22 = lowest6;
else if (RN23 < RN21, RN22, RN24) RN23 = lowest6;
else if (RN24 < RN21, RN22, RN23) RN24 = lowest6;
totWIS = RN21 + RN22 + RN23 + RN24;
cout << "Your Strength is: " << totSTR << endl;
cout << "Your Dexterity is: " << totDEX << endl;
cout << "Your Intelligence is: " << totINT << endl;
cout << "Your Constitution is: " << totCON << endl;
cout << "Your Charisma is: " << totCHA << endl;
cout << "Your Wisdom is: " << totWIS << endl;
}
}
}
}
}
}
}
| |