Saturday, 28 April 2018

Program to print first n odd number in c

/* program to print first n odd number*/
# include <stdio.h>
void main ()
{
int n,a=1 ;
int i=o ;
clrscr () ;
printf ("/n how many number you want to print :") ;
scanf ("%d", & n) ;
while ( i < n)
{
printf ("/n %d", a) ;
a = a+2 ;
i++ ;
}
getch () ;
}

No comments:

Post a Comment

Featured post

Kalgudi Interview Round!!

Those who cleared the second round of kalgudi got an email from exceller to complete their Kalgudi Interview Round. So here we will discuss ...