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 difference between the compiler and the preprocessor?

720


What jobs can you get with a c++ certification?

678


What are the five basic elements of a c++ program?

690


What gives the current position of the put pointer?

641


Does there exist any other function which can be used to convert an integer or a float to a string?

728






What are the advantages of inheritance in c++?

749


What is math h in c++?

689


what are the events occur in intr activated on interrupt vector table

1262


Is map ordered c++?

686


You have two pairs: new() and delete() and another pair : alloc() and free(). Explain differences between eg. New() and malloc()

689


Write a single instruction that will store an EVEN random integer between 54 and 212 inclusive in the variable myran. (NOTE only generate EVEN random numbers)

1589


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

679


What are the advantages of using friend classes?

721


What is the protected keyword used for?

724


What is function declaration in c++ with example?

617