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
What is iostream in c++ used for?
why and when we can declar member fuction as a private in the class?
What is the basic structure of a c++ program?
an integer constant must have atleast one a) character b) digit c) decimal point
Can you write a function similar to printf()?
What is lambda in c++?
How can you quickly find the number of elements stored in a dynamic array? Why is it difficult to store linked list in an array?
What are the basics of local (auto) objects?
what is scupper?
Describe protected access specifiers?
Show the declaration for a static function pointer.
In the derived class, which data member of the base class are visible?
How do I run a program in notepad ++?
What do you mean by function overriding & function overloading in c++?
How is c++ used in the real world?