Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

Wrestling stat tracker

Views: 23
1
#include <string>
2
#include <cstdlib>
3
#include <iostream>
4
5
using namespace std;
6
7
string Red;
8
string Green;
9
int redScore;
10
int greenScore;
11
int totalScoreR;
12
int totalScoreG;
13
int takedowns;
14
int escapes;
15
int reversals;
16
int nf2;
17
int nf4;
18
int penaltyPoints;
19
20
21
/*void PlayerNames(){
22
cout << "What is green's name?" << endl;
23
cin >> Green;
24
cout << "What is red's name?" << endl;
25
cin >> Red;
26
}*/
27
28
29
int TotalRedScore(takedowns, escapes, reversals, nf2, nf4, penaltyPoints){
30
totalScoreR = totalScoreR + (takedowns * 2) + (escapes) + (reversals * 2) + (nf2 * 2) + (nf4 * 4) + (penaltyPoints);
31
return totalScoreR;
32
}
33
34
int GetScoreRed(){
35
cout << "How many takedowns did " << Red << " get?" << endl;
36
cin >> takedowns >> endl;
37
cout << "How many escapes did " << Red << " get?" << endl;
38
cin >> escapes >> endl;
39
cout << "How many reversals did " << Red << " get?" << endl;
40
cin >> reversals >> endl;
41
cout << "How many two point nearfalls did " << Red << " get?" << endl;
42
cin >> nf2 >> endl;
43
cout << "How many four point nearfalls did " << Red << " get?" << endl;
44
cin >> nf4 >> endl;
45
cout << "How many penalty points did " << Red << " get?" << endl;
46
cin >> penaltyPoints >> endl;
47
48
TotalRedScore(takedowns, escapes, reversals, nf2, nf4, penaltyPoints);
49
}
50
51
int main(){
52
cout << "This program will track the stats of a college wrestling match." << endl;
53
// void PlayerNames;
54
55
56
cout << "End of Period 1" << endl;
57
GetScoreRed();
58
TotalRedScore();
59
//GetScoreGreen();
60
//TotalScoreGreen();
61
62
cout << Red << ": " << totalScoreR << endl;
63
//cout << Green << ": " << totalScoreG << endl;
64
65
66
67
cout << "End of Period 2" << endl;
68
GetScoreRed();
69
TotalRedScore();
70
//GetScoreGreen();
71
//TotalScoreGreen();
72
73
cout << Red << ": " << totalScoreR << endl;
74
//cout << Green << ": " << totalScoreG << endl;
75
76
77
cout << "End of Period 3" << endl;
78
GetScoreRed();
79
TotalRedScore();
80
//GetScoreGreen();
81
//TotalScoreGreen();
82
83
cout << Red << ": " << totalScoreR << endl;
84
//cout << Green << ": " << totalScoreG << endl;
85
86
cout << "Final Score" << endl;
87
//cout << totalScoreR << " - " << totalScoreG << endl;
88
89
90
91
}
92