adspace


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


Please Help Members By Posting Answers For Below Questions

Can union be self referenced?

1265


daily Routine of father

1483


How c functions prevents rework and therefore saves the programers time as wel as length of the code ?

1162


What is the latest version on c++?

1205


What character terminates all character array strings a) b) . c) END

1393