Prog#047: while loop-print odd & even numbers between 1 to 10

/* 
Program#47
while loop-print odd & even numbers between 1 to 10
*/

#include <stdio.h>
main(){
int n,a;
n=1;
while(n<=10){
a=n%2;
if(!a)
printf("\n Even no:%d",n);
else
printf("\n Odd no:%d",n);
n=n+1;
}
}