Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a program for odd numbers?

Answer Posted / sharon

WAP in C to print series of odd no. upto the given num. using function and with arguments
#include<stdio.h>
#include<conio.h>
void odd(int);
void main()
{
int num;
clrscr();
printf("enter number");
scanf("%d",&num);
odd(num);
getch();
}
void odd(int num)
{
int i;
clrscr();
printf("od number upto the given numbers are");
for(i=1;i<=num;i++)
{
if(i%2!=0)
{
printf("%d\t",i);
}
}

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the key features in c programming language?

1070


What is dangling pointer in c?

1215


Is null a keyword in c?

1194


Write a program to use switch statement.

1128


Are comments included during the compilation stage and placed in the EXE file as well?

1080


Is c pass by value or reference?

1033


What is 02d in c?

1072


Explain the difference between structs and unions in c?

1019


How variables are declared in c?

1037


What are the basic data types associated with c?

1268


Why c is a mother language?

1030


What is this infamous null pointer, anyway?

1048


Explain Function Pointer?

1163


Where is volatile variable stored?

1085


What are pointers really good for, anyway?

1062