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

Out of fgets() and gets() which function is safe to use and why?

723


Does c++ vector allocate memory?

530


Explain the static storage classes in c++.

700


What is stack unwinding?

604


What is c++ virtual inheritance?

595






How can an improvement in the quality of software be done by try/catch/throw?

586


How do you decide which integer type to use?

572


What is the best c++ book for beginners?

568


What is microsoft c++ redistributable 2013?

571


What is a manipulator in c++?

711


What is the latest c++ version?

603


write a porgram in c++ that reads an integer and print the biggest digit in the number

1764


Is python better than c++?

584


What do you mean by friend class & friend function in c++?

620


What is the full form of dos?

562