/*****************************************************************/ // File : oddlistn.c // Purpose : To generate ODD integers upto N numbers. // Author : Nanda Kishor K N // Mail Id : knnkishor@yahoo.com, nandakishorkn@rediffmail.com // Website : www.c4swimmers.esmartguy.com ( WEB MASTER ) // Group : c4swimmers@yahoogroups.com ( GROUP OWNER ) /*****************************************************************/ #include /* Name : main() Purpose : This is the main function that generates ODD integers upto N numbers. This does not call any other function. Parameter : None */ int main() { // Variable Declarations & Initialization // Naming conventions are used like all integer variables should begin with 'i' int iNum,iIdxOdd; printf("Enter a Number : "); scanf("%d",&iNum); printf("ODD numbers are as follows :"); // Generate a list of ODD integers upto N. iIdxOdd = 1; while ( iIdxOdd <= iNum ) { printf("\n%d",iIdxOdd); iIdxOdd += 2; } return 0; } // End of Program