Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What's the most powerful programming language?

989


What are the basic data types used in c++?

997


Can manipulators fall in love?

961


Why is null pointer used?

1113


What is iterator in c++?

1056


What is setiosflags c++?

907


What is the use of volatile variable?

1029


What is data binding in c++?

902


What are its advantages and disadvantages of multiple inheritances (virtual inheritance)?

1143


Can you explicitly call a destructor on a local variable?

977


Who calls main function?

1051


what is multi-threading in C++?

1003


Explain the benefits of proper inheritance.

1081


State the difference between delete and delete[].

1031


Can comments be longer than one line?

1019