Im trying to get final to be a decimal, however it couts final as an integer, rounded to the one's place value.
Code:
float intimcompar(int intimidation, int intimidation2)
{
int rndno1, rndno2, mod1, mod2;
float final;
rndno1=(rand() % 1000+1)+(rand() % 1000+1);
rndno2=(rand() % 1000+1)+(rand() % 1000+1);
mod1=intimidation-rndno1;
mod2=intimidation2-rndno2;
final=(mod1-mod2)/166;
cout << intimidation << " " << intimidation2 << " " << rndno1 << " " << rndno2 << " " << mod1 << " " << mod2 << " " << final << " \n";;
return final;
}