so the intention of the code is that it generate two random numbers between 1 and 100 for a division and i write the answer, then it tells me if its correct or not. For example 59/89 = 0.66 but says its incorrect (im sorry for the bad english)
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main()
{
int divC = 0; int divI = 0;
srand(static_cast<unsigned int>(time(0)));
char exit = 'n' ;
int divR1 = rand()%100; int divR2 = rand()%100;
double reDiv= 0; double solution = divR1 / divR2;
cout << "---------DIVISION---------" << endl;
cout << "Operation " << divR1 << " / " << divR2 << endl;
cout << "Answer: ";
cin >> reDiv;
if (reDiv == solution)
{
cout << "Correct." << endl;
divC + 1;
}
else
{
cout << "Incorrect" << endl;
divI + 1;
}
cout << "EXIT? [Y/N]: ";
cin >> exit;
return 0;
}
this is what i made, i hope i explain my problem well