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 / dally

#include<stdio.h>
int main()
{
int n,i;
printf("Enter values for n\n");
scanf("%d",&n);
for(i=0;i<=n;i++)
{
if(i%2 != 0)
printf("%d",i);
}
}

Is This Answer Correct ?    10 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is structure in c language?

1163


What is the difference between variable declaration and variable definition in c?

1054


Using functions, write a program that multiplies two arrays. Use the following functions: - Function ReadArray - Function MultiplyArrays - Function DisplayArrays

2346


Explain the difference between exit() and _exit() function?

1164


Difference between constant pointer and pointer to a constant.

1133


Explain how can type-insensitive macros be created?

988


What are the advantages of using linked list for tree construction?

1081


Describe static function with its usage?

1202


Can we declare variables anywhere in c?

999


What the advantages of using Unions?

1229


what value is returned to operating system after program execution?

2111


Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result

1898


Which is better between malloc and calloc?

1198


How will you delete a node in DLL?

1284


Which driver is a pure java driver

1595