hey all, I am having trouble with a program I am writing. Please note that I am a beginner programmer, who doesn't know much more than the basics. I used Dev C++ in a programming class I took and decided to stick with it. I have been trying to figure out how to use an If statement to run a couple equations on one variable, if that variable (an integer) is between 2 numbers, in this case between 64 and 1024. The line I am trying to figure out is noted by: (need proper If statement here)
I propably should have figured this out myself but I have tried everything I can think of. I hope someone here can help me.Code:if (num <= 64) { num2 = (num * 3); num3 = (num * 6); } if (num >= 1024) { num2 = (num * 1.25); num3 = (num * 1.5); } (need proper If statement here) { num2 = (num * 1.5); num3 = (num * 2.0); }
Thanks