Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners print numbers in traingle shape
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


kumar
print numbers in traingle shape
1 Answer(s)      3 years and 4 months ago
Posted in : Java Beginners


1

22

333

4444

i want output like this please help me


Advertisement
View Answers

July 27, 2011 at 10:12 AM


class Pyramid 
{
    public static void main(String[] args) 
    {
        for(int i=1;i<=4;i++){
        for(int j=1;j<=i;j++){
            System.out.print(i);
            }
            System.out.println();
        }
        }
}


Related Tutorials/Questions & Answers:
print numbers in traingle shape
print numbers in traingle shape  1 22 333 4444 i want output like this please help me   class Pyramid { public static void main(String[] args) { for(int i=1;i<=4;i++){ for(int j=1;j<
print numbers
print numbers  1234 123 12 1234   1234 123 12 1234
Advertisements
Application for print pyramid of numbers
Application for print pyramid of numbers  What is the code for printing the numbers like 1 1 1 1 2 2 1 1 3 4 3 1 1 4 7 7 4 1
print 100 numbers using loops
print 100 numbers using loops  how to print from 1 to 100 using for loop ?   Hi Friend, You can use the following code: class Loop...); } } } Thanks   class Numbers { public satic void main
print the even numbers between the range 100-200
print the even numbers between the range 100-200  Q ?write an application that print out the even numbers between the range 100-200 ? 1- which aer not divisible by 7 and 5 ? 2- Number of the numbers which are not divisible
How to print a equilateral triangle patren with numbers
How to print a equilateral triangle patren with numbers  I figure out how to use for loop to print the triangle but i couldn't get the exact values as this http://im37.gulfup.com/FzrOb.jpg could you please help me
write an application that print out the even numbers between the range 100-200
write an application that print out the even numbers between the range 100-200   write an application that print out the even numbers between... and determine the even numbers between them. class EvenNumbers { public static
how to write a program in java to print numbers in equalateral triangle
how to write a program in java to print numbers in equalateral triangle  the output must be 1 324 76589   Here is an example of pattern 1 2 3 4 5 6 7 8 9 Example: public class NumberTriangle{ public
shape looping
shape looping  can some1 help me?i have to make a shape using "*" by looping...and i dun know how...please and thank you * **   java diamond shape: public class Diamond{ public static void main(String[] args){ int
triangle shape
symbol; System.out.print(" how many lines you want to print? "); nline
print
print  How to print JFrame All Componant?   Please visit the following link: http://www.roseindia.net/java/example/java/swing/Print.shtml
Diamond shape num - Java Interview Questions
Diamond shape num  How To Print Diamond Shape Numbers I Want Logic?Using For loops?  Hi Friend, Try the following code: public class Diamond{ public static void main(String[] args){ int row = 5; for(int i=1
Print
into the stream and, as opposed to print() method, gets you to the new line after the text
How to convert a picture into a shape, convert a picture into a shape, picture shape
How to convert a picture into a shape       If you want to use a picture shape but you are not able for that, don't worry. You will learn easily to convert a picture into shape. Take
Shape - Java Beginners
Shape  Respected Sir, Please send me the code of diamond shape by using loop and with single statement of " " and single statement with "*".  ... for diamond shape.   Hi friend I understand your problem, so that I
How to convert new paper into a man shape, convert new paper into a man shape, new paper into a man shape
How to convert new paper into a man shape   ... shape in this example. Take a new picture: Take a news paper picture, choose Polygonal lasso tool (L key) to make selection like a man shape
Add Two Numbers in Java
these arguments and print the addition of those numbers. In this example, args... Add Two Numbers in Java     .... These passed arguments are of String types so these can't be added as numbers
Drawing a Shape in Excel Sheet
Drawing a Shape in Excel Sheet In this section, you will learn how to draw a shape in excel sheets using Apache POI library. Using Apache POI, you can draw a shape with the help of Microsoft Office drawing tools. The top-most shape
automorphic numbers
automorphic numbers  how to find automorphic number in java   Hi Friend, Pleas visit the following link: Automorphic numbers Thanks
Create Shape in Excel Using JSP
create shape in excel using jsp    ...; and then after we create a shape. At excel sheet e.g. we are creating line in this example. To create shape we use setShapeType() in this method we are passing
sorting numbers
sorting numbers  How to sort the numbers in ascending order   import java.util.*; class SortNumbers{ public static void main(String...=input.nextInt(); list.add(num); } System.out.println("Numbers
Prime Numbers
Prime Numbers  Create a complete Java program that allows the user to enter a positive integer n, and which then creates and populates an int array with the first n prime numbers. Your program should then display the contents
Rational Numbers
Rational Numbers   Write and fully test a class that represents rational numbers. A rational number can be represented as the ratio of two integer values, a and b, where b is not zero. The class has attributes for the numerator
Numbers pyramid
Numbers pyramid  Hi sir, Can you please tell me how to output this using nested for loops? 1 2, 1 1, 2, 3 4, 3, 2, 1 1, 2, 3, 4, 5 6, 5, 4, 3, 2, 1 1, 2, 3, 4, 5, 6, 7 8, 7, 6, 5, 4, 3, 2, 1 1, 2, 3, 4, 5, 6, 7, 8, 9 10, 9, 8
Creating Auto Shape in PowerPoint Using Java
Creating Auto Shape in PowerPoint Using Java... to create auto shape on PowerPoint slide using java. In this example, we are creating the object of AutoShape .We are passing the shape type into AutoShape
Inserting Text on Shape Using Java
Inserting Text on Shape Using Java       In this example we are going to create auto shape... the object of AutoShape .We are passing the shape type into AutoShape as argument
Prime Numbers - IDE Questions
Prime Numbers  Create a program that calculates the prime numbers from any inputted start and end range of values (e.g. 5 and 28) and print the prime numbers in rows of 10. Hint: Use a counter to count how many values are printed
print a form of *
print a form of *   * *** ***** ******* ********* ******* ***** *** *   Post the format properly
Listing all even numbers between two numbers
Listing all even numbers between two numbers  Hi, How to write code to list all the even numbers between two given numbers? Thanks   Hi, You function will take 2 numbers and the find the even numbers between
Advertisements
 

 

 

DMCA.com