print first nodd numbers in descending order

Answer Posted / radhakrishnan

main()
{
int i,n,k;
cout>>"Enter the number:";
cin<<n;
k=n%2;
if(k==0)
n=n-1;

for(i=n;i<=n;i=1-2)
cout>>1;
}

Is This Answer Correct ?    3 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many ways can a variable be initialized into in C++?

592


How to declare a function pointer?

573


Is dev c++ free?

608


Define whitespace in C++.

744


What is a binary file? List the merits and demerits of the binary file usagein C++.

724






What is bubble sort c++?

569


Explain mutable storage class specifier.

622


What is a stack c++?

563


Is map ordered c++?

585


What is time h in c++?

581


What are the benefits of pointers?

589


What is the use of register keyword with the variables?

543


If you don’t declare a return value, what type of return value is assumed?

538


How does a copy constructor differs from an overloaded assignment operator?

549


What does it mean to declare a member variable as static?

606