We literally started C++ 2 days ago, and my teacher knows nothing, we're supposed to do this program:
Write code that will multiply some number by 2 if the number is between 1 and 100 (including 1 or 100) and if it is evenly divisible by 3; otherwise multiply by 3 if it is between 1 and 100 but not divisible by 3; finally, if it isnÂ’t between 1 and 100, multiply the number by the number modulus 100. Hint: Use the nested if statement
Can anyone give me some starters? I know the basics, but how do you see if it's divisble by 3?? I can do it but it'd take like 15+ lines of code, is there a simple way?
ANY help is appreciated!