Answer Posted / vaishnavi
#include<iostream.h>
void main()
{
int i,n;
cout<<"Enter the number:"
cin>>n;
for(i=2*(n-1);i>=1;i=i-2)
{
cout<<i;
}
}
| Is This Answer Correct ? | 8 Yes | 8 No |
Post New Answer View All Answers
Why is "using namespace std;" considered bad practice?
What is the main use of c++?
Explain what is oop?
What is java and c++?
Explain selection sorting?
What are function prototypes?
How is modularity introduced in C++?
Can java be faster than c++?
What are the five basic elements of a c++ program?
Define pre-condition and post-condition to a member function in c++?
How we can differentiate between a pre and post increment operators during overloading?
What are the differences between the function prototype and the function defi-nition?
What is vectorial capacity?
What is a string example?
What is the difference between an external iterator and an internal iterator? Describe an advantage of an external iterator?