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 / akhil
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i,j,n;
cout<<"enter limit";
cin>>n;
for(i=1;i<=n;i++)
//cout<<"/n"; for printing line by line
for(j=1;j<=i;j++)
cout<<j;//
getch();
}
| Is This Answer Correct ? | 18 Yes | 1 No |
Post New Answer View All Answers
Why do we need c++?
What is an accessor in c++?
What is the best it certification?
When is the copy constructor called?
Do you know about latest advancements in C++ ?
What is namespace std; and what is consists of?
Write a Program for dynamically intialize a 2 dimentional array. Eg:5x20, accept strings and check for vowels and display the no.finally free the space allocated .
What is the difference between global variables and local variable
What are the advantages of inheritance in c++?
an integer constant must have atleast one a) character b) digit c) decimal point
Who invented turbo c++?
Explain the problem with overriding functions
Evaluate !(1&&1||1&&0) a) Error b) False c) True
What is ios in c++?
How does com provide language transparency?