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

Can this keyword be used to refer static members?

974


Which class cannot be a subclass in java?

953


What is set and get methods in java?

926


What is void class in java?

913


Is node a data type in java?

942


What are the differences between wait() and sleep()?

957


What is unicode in java?

886


Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?

1542


What is the difference between == and === javascript?

1090


What is the full meaning of java?

993


What does substring mean?

924


What is var keyword ?

1126


What is sortedset in java?

976


What is string literal in java?

995


Enlist few advantages of inheritance?

1026