-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbolosDanielGutierrez.cpp
More file actions
56 lines (55 loc) · 1.5 KB
/
bolosDanielGutierrez.cpp
File metadata and controls
56 lines (55 loc) · 1.5 KB
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
#include <iostream>
using namespace std;
int main()
{
int turno = 0, tiro1, tiro2, tiro1extra = 0, tiro2extra = 0, puntaje = 0;
bool media = false;
bool monona = false; //moñona, creo que el programa no reconoce la "ñ"
while (turno < 10)
{
turno = turno + 1;
cout << "Inserte el tiro 1" << endl;
cin >> tiro1;
cout << "Inserte el tiro 2" << endl;
cin >> tiro2;
if (monona == true)
{
puntaje = puntaje + tiro1 + tiro2;
monona = false;
}
if (tiro1 == 10)
{
monona = true;
}
if (media == true)
{
puntaje = puntaje + tiro1;
media = false;
}
if (tiro1 + tiro2 == 10 && monona == false)
{
media = true;
}
puntaje = tiro1 + tiro2 + puntaje;
if (turno == 10)
{
if (media == true)
{
cout << "Tiene 1 tiro extra";
cin >> tiro1extra;
puntaje = tiro1extra + puntaje;
}
else if (monona == true)
{
cout << "Tiene 2 tiro extra" << endl;
cout << "Inserte el 1 tiro" << endl;
cin >> tiro1extra;
cout << "Inserte el 2 tiro" << endl;
cin >> tiro2extra;
puntaje = tiro1extra + puntaje + tiro2extra;
}
}
}
cout << "Su puntaje final es: " << puntaje;
return 0;
}