HTML Tutorial || Networking Assignment || Computer Full Forms || Ms-Office Shortcut Keys || Ms-Office Notes || Number System Notes || Internet Assignment
JavaScript Tutorial || CSS Tutorial || Operating System Notes || History of Computer Assignment || Netwoking Notes || Computer Fundamentals Notes

C program to Print all Odd Numbers b/w 1 to 10 ?


Q:- Write a C program to Print all Odd Numbers b/w 1 to 10 ?
      Input
        #include<stdio.h>
        #include<conio.h>
        main()
  {
int i=1;
clrscr();
printf(“Odd Numbers b/w 1 to 10 are =”);
while(i<=10)
{
printf(“%d\n”,i);
i=i+2;
}
getch();
  }


Output

Odd Numbers b/w 1 to 10 are = 1
3
5
7
9

Comments