I'm doing some practice problems in my c++ book and this particular one has me stuck. The problem asks to calculate 80% of the amount it would cost to replace the structure but when I try to compile it says "error C2296: '%' : illegal, left operand has type 'float'" on the 11th line. What should I do differently?
Code:#include <iostream>
using namespace std;
int main()
{
float house, replacement;
cout << "Please enter the replacement costs of any of your buildings: ";
cin >> house;
replacement = house % 80;
cout << "The minimum amount of insurance you should get is " << replacement;
return 0;
}