ok so I posted recenly asking how to do the average. My program is technicaly complete, with one problem. If I want to play the game again (y||Y) it only gives me a multiplication problem once instead of the 5. Here is my code so far.
#include<iostream>
#include<cmath>
#include<stdlib.h>
#include<time.h>
using namespace std;
int main()
{
char again;
int a, b, answer, guess ,count=1;
short int average;
float collect=0;
cout<< "Welcome, I hope you remember your multiplication tables:"<<endl;
cout<<endl;
{again='y';
true;
while ((again=='y') || (again=='Y'))
{
do{
srand ((unsigned)time(NULL) );
a = rand() % 10;
b = rand() % 10;
cout << "\nWhat's " << a << "x" << b << "?: ";
cin >> guess;
collect is never set back to 0 which will be a problem when calculating the average for successive attempts. The loop fails because count is never reset to 1, so when you start your loop count is at 6 already.
It work perfectly fine for me, make sure you move the bracket from cin>>again; to below the if statement. It needs to check the input while still inside the while loop.