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

Answer Posted / ramesh.bugatha78

for(int i=1;i<=5;i++)
{
for(int j=1;j<=i;j++)
cout<<j;
cout<<"\n";
}

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you mean by inheritance in c++? Explain its types.

708


What are the various arithmetic operators in c++?

668


Comment on c++ standard exceptions?

729


Write a short code using c++ to print out all odd number from 1 to 100 using a for loop

679


What is a dangling pointer in c++?

755






Which bit wise operator is suitable for putting on a particular bit in a number?

812


how to access grid view row?

1896


What is difference between c++ and c ++ 14?

671


How is new() different from malloc()?

738


Explain what are the sizes and ranges of the basic c++ data types?

740


Is there any difference between int [] a and int a [] in c++?

640


why is c++ called oops? Explain

668


Is c++ platform dependent?

727


Write a program in C++ for Fibonacci series

757


What does h mean in maths?

670