I found answers for other operators but it seems like % has its own properties:
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
float pprice;
cout << "Enter the purchase price =>" << endl;
cin >> pprice;
float cash = 10000%pprice;
return 0;
}
//Error: invalid operands of types 'int' and 'float' to binary 'operator%'
This is only a sample of the code which displays the same error. Please how can I fix this error?