The problem here is that amountY and interestR have to be integers, becasue they were formmated as a character and I had to format them to a integer. But gains has to be a float. Is there a way to convert things to work correctly, that is mixing a float and integer? Can I convert char to float? ThanksCode:int gains; for(i=1;i<=j;i++){ cout<<i<< " "; gains = (amountY*interestR)/100.0f; amountY = amountY + gains; cout <<amountY << endl; }





Reply With Quote