parse error on my program
Code:
#include<iostream>
#include<ctime>
using namespace std;
int main()
{
cout<<"Welcome To Charlies Slot machine"<<endl;
cout<<"press 1 to play 2 not to play"<<endl;
int a;
cin>>a;
if (a==1)
{
cout<<"You have chosen to play"<<endl;
cout<<"1 to roll 2 not to roll"<<endl;
int b;
cin>>b;
if (b==1)
{
int c;
srand(time(0));
c=1+rand()%6;
cout<<"you rolled"<<c<<" ";
int d;
srand(time(0));
d=1+rand()%6;
cout<<d<<" ";
int e;
srand(time(0));
e=1+rand()%6;
cout<<e<<endl;
if (c==d==e)
{
cout<<"you won";
}
return 0;
}
That is a simple slot machine i made if you get 3 numbers the same you win it sais parse error at the end why is this?