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
How are Structure passing and returning implemented by the compiler?
Assume an array of structure is in order by studentID field of the record, where student IDs go from 101 to 500. Write the most efficient pseudocode algorithm you can to find the record with a specific studentID if every single student ID from 101 to 500 is used and the array has 400 elements. Write the most efficient pseudocode algorithm you can to find a record with a studentID near the end of the IDs, say in the range from 450 to 500, if not every single student ID in the range of 101 to 500 is used and the array size is only 300
What is a volatile variable in c++?
Does improper inheritance have a potential to wreck a project?
If dog is a friend of boy and boy is a friend of house, is dog a friend of house?
Why do we use using namespace std in c++?
Can we get the value of ios format flags?
How to declare a pointer to an array of integers?
How can a called function determine the number of arguments that have been passed to it?
Which software is best for c++ programming?
What is a unnitialised pointer?
Why use of template is better than a base class?
What is static class data?
Why are pointers not used in c++?
How many different levels of pointers are there?