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...

Program to print 1
1 2
1 2 3
1 2 3 4 like that

Answer Posted / vivek

#include<iostream>
using namespace std;
int main()
{
int i,j,n,k;
cout<<"provide the no. of row";
cin>>n;
for(i=1; i<=n; i++)
{
k=n-i;
while(k>0)
{
cout<<" ";
k--;
}
for(j=1; j<i; j++)
cout<<" "<<j<< " ";
cout<<"\n";
}
return(0);
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the abstraction?

1029


Is int primitive data type?

962


Where are the card layouts used?

1080


What is mutable object and immutable object?

1139


What is the difference between compiler and jvm?

1066


when to use ArrayList and when to use HashMap in webApplication.

4725


What are different types of states exist for a thread?

1022


How do you implement singleton class?

998


What are bind parameters?

1064


Why does it take so much time to access an applet having swing components the first time?

1940


Can we make constructors static?

1248


What is the purpose of declaring a variable as final?

980


What is return code?

1023


What are the data types supported by java?

1039


What is primitive data type in java?

994