print first nodd numbers in descending order

Answer Posted / dudelzy

#include <iostream>

using namespace std;

int main()
{
int num, x;
cout << "No. of odd numbers u want to find ";
cin >> num;
cout << "" << endl;
for(x = num; x <= num; x--){
if(x % 2 == 1){
cout << x << endl;
}
}
return 0;
}

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of container classes?

608


Define copy constructor.

615


Is c++ an integer?

569


What is one dimensional array in c++?

571


Explain the concept of memory leak?

618






What is friend class in c++ with example?

494


What is c++ mutable?

696


What is the insertion operator and what does it do?

561


What is ios in c++?

638


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

724


How can you quickly find the number of elements stored in a static array?

629


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

629


What are the uses of pointers?

571


Explain Text Manipulation Routines?

640


What is virtual table?

608