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

an operation between an integer and real always yeilds a) integer result b) real result c) float result

1168


How can you say that a template is better than a base class?

1076


What is a loop? What are different types of loops in c++?

1142


Specify different types of decision control statements?

861


What is basic if statement syntax?

1098


What is the use of typedef?

1102


Tell me what are static member functions?

1086


What is c++ best used for?

1071


How do I get good at c++ programming?

1182


When there is a global variable and local variable with the same name, how will you access the global variable?

1110


What is singleton pattern in c++?

1002


What does namespace mean in c++?

1083


write a corrected statement in c++ so that the statement will work properly. x = y = z + 3a;

1903


What is a class template in c++?

1058


What is the header file for setw?

1140