so the beginning of this semester i started taking a coding class and i know the basics but not all the in depth technical things could someone help me out with this error?
this is the error i get and its talking about the if else statement around line 43
if anyone knows what to do to fix this error please let me know im very confused
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
char response;
int flip ();
int coin, counter, tails = 0, heads = 0, dice, S1 = 0, S2 = 0, S3 = 0, S4 = 0, S5 = 0, S6 = 0;
if (response == 'C')
for (counter = 1; counter <= 1; counter++)
{
coin = flip ();
if (coin == 0)
{
cout << "T ";
tails = tails + 1;
}
else if( coin == 1)
{
cout << "H ";
heads = heads + 1;
}
}
cout<<endl;
cout<<"Tails Was Tossed "<<tails<<"times"<<endl;
cout<<"Heads Was Tossed "<<heads<<"times"<<endl;
}
int flip()
{
return rand ( ) % 2;
}
if (response == 'D'){
int flip();
{
for (counter = 1; counter <= 1; counter++)
{
dice = flip ();
if(dice == 0)
{
cout<<"1 ";
S1 = S1 + 1;
}
else if( dice == 1)
{
cout<<"2 ";
S2 = S2 + 1;
}
else if( dice == 1)
{
cout<<"3 ";
S3 = S3 + 1;
}
else if( dice == 1)
{
cout<<"4 ";
S4 = S4 + 1;
}
else if( dice == 1)
{
cout<<"5 ";
S5 = S5 + 1;
}
else if( dice == 1)
{
cout<<"6 ";
S6 = S6 + 1;
}
}
cout<<endl;
cout<<"Side 1 was Rolled "<< S1 <<" times"<<endl;
cout<<"Side 2 was Rolled "<< S2 <<" times"<<endl;
cout<<"Side 3 was Rolled "<< S3 <<" times"<<endl;
cout<<"Side 4 was Rolled "<< S4 <<" times"<<endl;
cout<<"Side 5 was Rolled "<< S5 <<" times"<<endl;
cout<<"Side 6 was Rolled "<< S6 <<" times"<<endl;
}
int flip()
{
return rand( ) % 2;
}
}