Write a program to print odd numbers from 1 to n , n is given | CODE WITH SHARAD

Write a program to print odd numbers from 1 to n , n is given

Written by Sharad Raj on 13th of March, 2018

BASIC PROGRAMS   C LANGUAGE PROGRAMS

PROGRAM CODE

#include<stdio.h>

#include<conio.h>

void main()

{

int i,n;

clrscr();

printf(enter the value of n : );

scanf(%d,&n);

for(i=1;i<=n;i=i+2);

{

printf(%d,n);

}

getch();

}


Comments


Contact