Find odd number using C.


 #include<stdio.h>

#include<conio.h.

int main()

{

int i, j;

printf("Enter the number which you like most");

scanf("%d" , &j);

for(i=1; i<=j; i++)

if(i%2 !=0)

{

printf(%d \n", i );

}

getch( );

return 0;

}

To run:















output:



No comments:

Post a Comment

theengineerschoice01@gmail.com