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 / aditya

public class pattern
{
public static void main(int n)
{
int i,j,k;
for(i=1;i<=n;i++)
{
for(j=n;j>i;j--)
{
System.out.print(" ");
}
for(k=1;k<=i;k++)
{
System.out.print(+k+" ");
}

System.out.println();
}
}

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is return used for in java?

1072


How do you square a number in java?

1106


How many classes can any class inherit java?

1020


Why is it called buffering?

1187


how to one war file class to another war file class?

2150


What is an object in java?

1095


What is generic type?

1081


Explain the importance of throwable class and its methods?

1095


What is structure of java heap? What is perm gen space in heap?

1190


Explain the transient field modifier?

1091


Differentiate between nested and inner class in java.

1050


How many threads can I run java?

1181


Explain JMS in detail.

1070


What is the string function?

1005


What is class and its types?

1104