Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

print first nodd numbers in descending order

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


Please Help Members By Posting Answers For Below Questions

What is iostream in c++ used for?

1015


why and when we can declar member fuction as a private in the class?

2060


What is the basic structure of a c++ program?

1132


an integer constant must have atleast one a) character b) digit c) decimal point

1020


Can you write a function similar to printf()?

1124


What is lambda in c++?

1194


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?

1024


What are the basics of local (auto) objects?

1130


what is scupper?

2374


Describe protected access specifiers?

1200


Show the declaration for a static function pointer.

1038


In the derived class, which data member of the base class are visible?

1106


How do I run a program in notepad ++?

1090


What do you mean by function overriding & function overloading in c++?

1163


How is c++ used in the real world?

1028