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
What is the difference between the compiler and the preprocessor?
What jobs can you get with a c++ certification?
What are the five basic elements of a c++ program?
What gives the current position of the put pointer?
Does there exist any other function which can be used to convert an integer or a float to a string?
What are the advantages of inheritance in c++?
What is math h in c++?
what are the events occur in intr activated on interrupt vector table
Is map ordered c++?
You have two pairs: new() and delete() and another pair : alloc() and free(). Explain differences between eg. New() and malloc()
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)
What is meant by entry controlled loop? What all C++ loops are exit controlled?
What are the advantages of using friend classes?
What is the protected keyword used for?
What is function declaration in c++ with example?