Codice:
#include<iostream>
#include<windows.h>
#include<ctime>
#include<string>
using namespace std;
int main(){
int condizione;
system("color a"),
cout << " ToMbOlA v.5.0 By C4rM3l0 PeTrAsChI" << endl;
Beep(250,100);
Beep(300,200);
Beep(200,19);
Beep(200,200);
Beep(200,150);
Beep(230,123);
Beep(12,32);
cout <<""<<endl;
cout <<" premi 1 per giocare" << endl;
cout <<"premi 2 per uscire"<<endl;
cin >> condizione;
Beep(200,100);
switch(condizione){
case 1:
string gioca;
string numero;
cout << "scrivi gioca"<<endl;
cin >> gioca;
Beep(200,150);
cout <<"scrivi la parola numero"<<endl;
cin >> numero;
Beep(300,400);
if(gioca == "gioca" && numero == "numero")
{
Beep(200,100);
Beep(100,300);
Beep(300,200);
Beep(400,100);
Beep(500,200);
Beep(500,200);
Beep(340,231);
Beep(230,213);
srand(static_cast<unsigned>(time(NULL)));
}
else
{
cout <<"ERRORE"<<endl;
}
while (true)
while(1==1)
{
system("cls");
cout <<"attendi mentre i numeri vengono mescolati"<<endl;
cout << rand() % 50;
if(rand()<30)
{
Beep(200,130);
{
if(rand() >= 50)
Beep(234,123);
{
if(rand() == 30)
Beep(130,342);
}
system("pause");
}
break;
}
{
}
}
}
}