print first nodd numbers in descending order

Answer Posted / clearner

void odddesc(int n)
{
for(int i=(2*n-1);i>=1;i=1-2)
cout<<i<<endl;
}

Is This Answer Correct ?    5 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are manipulators used for?

601


Describe the syntax of single inheritance in C++?

640


Is the declaration of a class its interface or its implementation?

697


How would you call C functions from C++ and vice versa?

629


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

606






What does the following do: for(;;) ; a) Illegal b) Loops forever c) Ignored by compiler...not illegal

691


What operators can you overload in c++?

589


Explain container class.

681


What is a far pointer? where we use it?

609


How does c++ structure differ from c++ class?

577


Which field is used in c++?

628


Mention the purpose of istream class?

613


What is an arraylist c++?

681


Explain unexpected() function?

578


What are the types of array in c++?

616