Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <time.h>
- using namespace std;
- int main()
- {
- char apostar;
- char cDoagain;
- double fichas = 50;
- int fichasshow = 50;
- cout <<"Pressione S para apostar! "<< endl;
- cin >> apostar;
- if (apostar == 's'|apostar == 'S')
- {
- do
- {
- system("clear");
- int um;
- int dois;
- int tres;
- um = (rand() % 4) + 1;
- dois = (rand() % 4) + 1;
- tres = (rand() % 4) + 1;
- cout <<" __________________________ "<< endl;
- cout <<"| | | |"<< endl;
- cout <<"| | | |"<< endl;
- cout <<"| "<< um <<" | "<< dois <<" | "<< tres <<" |"<< endl;
- cout <<"| | | |"<< endl;
- cout <<"|________|________|________|"<< endl;
- cout <<"FICHAS: "<< fichasshow << endl;
- if (um == dois == tres)
- {
- cout <<"PA-RA-BENS! VOCÊ GANHOU!!! "<< endl;
- cout <<"Você ganhou 15 fichas! "<< endl;
- fichas++;
- fichas++;
- fichas++;
- fichas++;
- fichas++;
- fichas++;
- fichas++;
- fichas++;
- fichas++;
- fichas++;
- fichas++;
- fichas++;
- fichas++;
- fichas++;
- fichas++;
- }
- else
- {
- fichasshow = fichas - 1;
- fichas = fichasshow;
- }
- cout <<"Apostar de novo? (s ou n) "<< endl;
- cin >> cDoagain;
- }while (cDoagain == 's'||cDoagain == 'S');
- }
- }
Add Comment
Please, Sign In to add comment