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
What is c++ library?
What is a breakpoint?
Do you know what are the new features that iso/ansi c++ has added to original c++ specifications?
how can i access a direct (absolute, not the offset) memory
address?
here is what i tried:
wrote a program that ask's for an address from the user,
creates a FAR pointer to that adress and shows it. then the
user can increment/decrement the value in that address by
pressing p(inc+) and m(dec-).
NOW, i compiled that program and opened it twice (in 2
different windows) and gave twice the same address to it.
now look what happen - if i change the value in
one "window" of the program, it DOES NOT change in the
other! even if they point to the same address in the memory!
here is the code snippet:
//------------------------------------------------------
#include Why do we use the using declaration? What is the difference between global variables and local variable Is java made in c++? What are the benefits of pointers? What is the difference between the parameter to a template and the parameter to a function? What is the arrow operator in c++? What is a class definition? What is exception handling? Does c++ support exception handling? What is string in c++ programming? What is c++ and its features? What is the need of a destructor? Explain with the help of an example.