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

write a c++ program that gives output
4
3 4
2 3 4
1 2 3 4 using looping statement

Answer Posted / sandeep mannnarakkal

void printSeries(int nNum)
{
for ( int i = 0 ; i < nNum ; i ++)
{
for ( int j = nNum -i ; j <= nNum ; j ++)
{
cout << j;
}
cout << endl;
}
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the role of copy constructor in copying of thrown objects?

1007


What is the use of class in c++?

1007


Is c++ double?

980


What is the difference between structure and class?

1162


Why pointer is used in c++?

1086


What are c++ storage classes?

1048


Explain public, protected, private in c++?

961


What is the this pointer?

1075


What is while loops?

997


Differentiate between late binding and early binding. What are the advantages of early binding?

975


Explain polymorphism?

1032


Explain about Virtual Function in C++?

975


Which should be more useful: the protected and public virtuals?

982


What is an adjust field format flag?

1073


How do you declare A pointer to function which receives an int pointer and returns a float pointer

1122