C++ Program/Code to print all the odd numbers between 1-n;

//The following C++ program code will print all the odd number between 1 to n, where n is the user //specified number

#include<iostream> //For Input/Output Stream#include<conio.h> //For clrscr & getcheusing namespace std; //using the standard namespacevoid main(){clrscr(); //clearing the console screenint n,i=1; //variable 'i' is initialized herecout<<"Enter max. limit to which you like to print odd number:";cin>>n; //input of value of 'n' from userwhile(i<=n){cout<<i<<","; //printing the no. and introducing ',' between themi+=2; //generating the next odd no. and its equivalent to 'i=i+2' }getche(); //to exit the program after a keystroke}