Using looping methods and the IF constrcut to print the numbers between 1 and 10 along with an idications of whether each is even or odd. Like this
1 is odd
2 is even
3 is odd
CIC Y1 G1
void main (void)
int iCount; //decalered integar variable
iCount=1; //assigning 1 to iCount
i understand the basic idea for C but require further assisance. This only gives one error. Else is misplaced.
I know there are other ways to do this without the need to use a maths division but that would only work for the numbers i choose.
My idea is, if a number is divisable by 2 and gives a remainder 0. Then its even
If a number is divisable by 2 and gives a remiander 1. It is odd
Many thanks if you help me on this,