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 are static member functions?
When should we use multiple inheritance?
Is c++ harder than java?
Describe private, protected and public?
Explain the use of virtual destructor?
Which field is used in c++?
What is the extraction operator and what does it do?
What is the sequence of destruction of local objects?
Write a program in C++ for Fibonacci series
Which bit wise operator is suitable for turning off a particular bit in a number?
Can we inherit constructor in c++?
What is the use of :: operator in c++?
What is the full form of stl in c++?
What are vectors used for in c++?
What is exception handling? Does c++ support exception handling?