Answer Posted / nagarajan n.
int n;
cout<<"enter a num:";
cin>>n;
for(int i=n;i>=1;i--)
{
if((i%2)!=0)
{
cout<<i<<"/t";
}
}
| Is This Answer Correct ? | 50 Yes | 26 No |
Post New Answer View All Answers
What is the use of namespace std in C++?
When do we run a shell in the unix system? How will you tell which shell you are running?
Why is main function important?
Given the following seqment of code containing a group of nested if instructions: y = 9; if ((x==3) || (x == 5)) y++; else if (x == 2) y *= 2; else if (x == ) y-= 7; else y = 8; if the value of x is 4 before the nested IFs are executed, what is the value of y after the nested IFs are executed?
What are shallow and deep copy?
Is c++ a float?
What is binary search in c++?
Is c++ an oop?
Function can be overloaded based on the parameter which is a value or a reference. Explain if the statement is true.
What is the full form of stl in c++?
What is meant by entry controlled loop? What all C++ loops are exit controlled?
Can we distribute function templates and class templates in object libraries?
Write a program to add three numbers in C++ utilizing classes.
When should I use unitbuf flag?
What is the syntax for a for loop?