Printing all odd number between 1&30

Monday, 29 August 2011

#include<stdio.h>
#include<conio.h>
void main()
{
int t=1;
clrscr();
while(t<30)
{
    if(t%2==1)
    printf(" %d",t);
    t++;
}
getch();
}

OUTPUT:

1  3  5  7  9  11  13  15  17  19  21  23  25  27  29





No comments:

Post a Comment

 

Blogger news

Blogroll

Enter your email address:

Delivered by FeedBurner

Total Pageviews

Followers

Most Reading