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 / sunil pradhan

public class program1 {

public static void main(String[] args){

for(int i = 1; i<=5 ;i++){

for(int k = 1; k<=i; k++){

System.out.print(k);
}
System.out.println("\n");
}

}

}

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you declare an array in java?

1136


What is the difference between yield() and sleep()?

1070


What is the difference between dom and sax parser in java?

1029


How do you sort arrays in java?

990


What is the main difference between java platform and other platforms?

1181


What is ternary operator?

1061


What is the right data type to represent a price in java?

1026


What is a copy constructor in java?

1203


How do you declare a destructor in java?

1087


Can we call a non-static method from inside a static method?

1051


What is array pointers ?

1088


What is the functionality of the stub?

1090


What does java edition mean?

1265


What is an argument in java?

990


What is type inference in java8?

1106