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 are static member functions?

1159


When should we use multiple inheritance?

1099


Is c++ harder than java?

1129


Describe private, protected and public?

1139


Explain the use of virtual destructor?

1121


Which field is used in c++?

1152


What is the extraction operator and what does it do?

1126


What is the sequence of destruction of local objects?

1023


Write a program in C++ for Fibonacci series

1249


Which bit wise operator is suitable for turning off a particular bit in a number?

1164


Can we inherit constructor in c++?

1144


What is the use of :: operator in c++?

1186


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

1238


What are vectors used for in c++?

1142


What is exception handling? Does c++ support exception handling?

1084