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...

print first nodd numbers in descending order

Answer Posted / rabid manatee

#include <iostream>
using namespace std;

int main(int argc, char *argv[]) {

int n = 4;

if (argc == 2) {
n = atoi(argv[1]);
}

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

}

Is This Answer Correct ?    3 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the use of virtual destructor?

1082


What is the maximum combined length of command line arguments including the space between adjacent arguments?

1010


What causes a runtime error c++?

1138


Explain what happens when a pointer is deleted twice?

1266


How do you print a string on the printer?

1046


How would perform Pattern Matching in C++?

1245


Explain rtti.

1090


Why is c++ called oops?

1187


What is the sequence of destruction of local objects?

982


How to tokenize a string in c++?

1072


What is setfill c++?

1166


What is bubble sort c++?

1016


What is the difference between the functions rand(), random(), srand() and randomize()?

1296


What is lambda expression c++?

1065


What does iomanip mean in c++?

1211