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 about Garbage Collector?

1109


List down the guideline that should be followed while using friend function.

1055


How much do coding jobs pay?

1000


What character terminates all character array strings a) b) . c) END

1261


Distinguish between new and malloc and delete and free().

1017


How many standards of c++ are there?

1088


What are namespaces in c++?

1082


What is :: operator in c++?

1037


What do you mean by a template?

1063


What is the use of c++ programming language in real life?

1034


What is the difference between structures and unions?

1054


What will the line of code below print out and why?

723


Differentiate between declaration and definition.

1041


How do you find out if a linked-list has an end? (I.e. The list is not a cycle)

1149


Mention the ways in which parameterized can be invoked. Give an example of each.

1046