Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdlib.h>
- #include <time.h>
- #include <string>
- using namespace std;
- int main()
- {
- string risposte[10]={"Si.","Vabene.","Forse.","No.","Non ricordo.","Non mi va di risponderti","Ma anche no","Zitto","Non so","Può darsi"};
- srand(time(NULL));
- string domanda;
- int i2;
- for(int i=0; i<10; i++)
- {
- cout<<"Fammi una domanda!\n";
- getline(cin, domanda);
- do{
- i2=rand()%10;
- }while(risposte[i2][1]==1);
- cout<<risposte[i2]<<endl<<endl;
- risposte[i2][1]=1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment