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

What is binary tree in java?

1062


What is a static method in java?

1054


What is equals method in java?

1041


What is difference between call by value and call by reference?

1000


Define how can we find the actual size of an object on the heap?

1210


What is int argc char * argv?

1172


How do you read a char in java?

1028


Can a class be private?

963


Can a class have 2 constructors?

901


Is 64bit faster than 32 bit?

1072


How does multithreading take place on a computer with a single cpu in java programming?

1018


what is comparable and comparator interface?

996


Explain the importance of finally over return statement?

1046


What is the difference between sop and work instruction?

927


What is the properties class?

1093