write a program for odd numbers?

Answer Posted / sreeshma

#include<stdio.h>
main()
{
int i,n;
printf("enter a range of numbers");
scanf("%d",&n);
for(i=0;i<=n;i+2)
{
printf("%d",i);
}
break;
getch();

Is This Answer Correct ?    9 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is default value of global variable in c?

564


Define macros.

785


What is the meaning of typedef struct in c?

594


How can you be sure that a program follows the ANSI C standard?

1130


What are the disadvantages of external storage class?

592






Explain the use of function toupper() with and example code?

655


Which is better oop or procedural?

634


What is a pointer on a pointer in c programming language?

621


if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.

4505


What is a pointer in c plus plus?

697


How can I read/write structures from/to data files?

552


how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.

1214


#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }

720


how can use subset in c program and give more example

1502


How can I invoke another program or command and trap its output?

618