Hi! I'm absolutely beginner. I learned some variables and tried to write this code to solve the equation a*(1+(b/30)). To me, the problem seems to be that I can't use letters with numbers, like I do in lines 16 and 21. What is the correct way to write this and get it to work?
To me, the problem seems to be that I can't use letters with numbers
I don't know what you mean by that.
Keep in mind that you've declared your variables as integers. Therefore, the compiler will do integer arithmetic. i.e for any value of b less than 30, c will always be 1 and sum will always be a.
I specify cin's namespace {std} instead of polluting the global namespace with usingnamespace std;.
For simple programs usingnamespace std; should not be a problem. But when working with larger projects that use multiple libraries it can create compiler/debugging problems.