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
How many namespaces are there in c++?
Is java easier than c++?
What is the difference between equal to (==) and assignment operator (=)?
Why cstdlib is used in c++?
What are virtual constructors/destructors?
What is the use of class in c++?
What is the difference between while and do while loop?
Explain method of creating object in C++ ?
Which software is best for programming?
What is the difference between multiple and multilevel inheritance in c++?
List different attributes in C++?
Which is the best c++ compiler for beginners?
What is static in c++?
Program to check whether a word is a sub-string or not of a string typed
an integer constant must have atleast one a) character b) digit c) decimal point