There's a Quite alot of Problems in there, for example in many places you put:
if (answer1 == 'y')
{
count1 =2 ;
else
count1 = 0 ;
}
You might have this problem :
expected primary-expression before "else"
That's not correct since you want it to be
But you've added else in the block of if

. So the compiler would treat it as something else most likely.
(There's alot of places where you wrote it like that.

)
Also in:
You Forgot to add the ' ' (things(not speechmarks)) on around the y!
so the correct way is:
There's a few places with that mistake as well.
There's also places where you forgot to add the semicolon ";" on the end. I'm sure you can find those.
You also forgot to intialize your variables

: "result" and "total"
I recommend you intialize them as double or float when you do change it.
And there's something you forgot after "return 0".(its easy to find!

)
Hope this helped!