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

Can we define private and protected modifiers for variables in interfaces?

1018


What is the difference between double and float variables in java?

1079


What is ++ a in java?

923


Is map sorted in java?

1004


How to change the priority of thread or how to set priority of thread?

979


What is an exception? difference between Checked and Unchecked exception in Java

954


What is preflight request?

941


What is a constructor overloading in java?

981


How can you add and remove nodes in jtree?

971


What are checked exceptions?

963


please send me hr interview questions in it industry

2061


What is the difference between static binding and dynamic binding?

1041


What is the primary benefit of encapsulation?

1007


What is a variable and constant?

954


How many bytes are a float?

919