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 / 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


Please Help Members By Posting Answers For Below Questions

What is the use of namespace std in C++?

1015


When do we run a shell in the unix system? How will you tell which shell you are running?

913


Why is main function important?

1048


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?

1948


What are shallow and deep copy?

1038


Is c++ a float?

1010


What is binary search in c++?

973


Is c++ an oop?

1021


Function can be overloaded based on the parameter which is a value or a reference. Explain if the statement is true.

1059


What is the full form of stl in c++?

1131


What is meant by entry controlled loop? What all C++ loops are exit controlled?

1012


Can we distribute function templates and class templates in object libraries?

1015


Write a program to add three numbers in C++ utilizing classes.

1054


When should I use unitbuf flag?

963


What is the syntax for a for loop?

1066