answersLogoWhite

0


Best Answer

public class equitraingle {

public static void main(String[ ] args) {

int numrows=6; // changing the value of numrows,respective o/p will be printed

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

for(int j=1;j<numrows-i;j++)

{

System.out.print(" ");

}

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

System.out.print(k+" ");

}

System.out.println("");

}

}

}

o/p:

1

1 2

1 2 3

1 2 3 4

1 2 3 4 5

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How can iwrite java program to print programming in triangle form?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Do I need a C plus plus program to print PASCAL's triangle?

No.


Write a program in qbasic to make a hut using print statemant?

a triangle then a square :)


Can you print string without using semi column in printf statement in c programming?

If you forget the semicolon, your program won't compile.


Do a program with turbo pascal to print the alphabet backward?

Turbo Pascal is a style of computer programming. This type of writing language can be used to create a program that prints the alphabet backwards.


How do you print a triangle of stars?

write a c++ programe to print a triangle without (for)


How do you write a program to print numbers from star one and next line star two in php?

Try the triangle program on a search engine. Replace numbers with stars and that should do the trick


Write a C plus plus function that print a triangle of stars?

Write a function that print a triangle of stars.


What is meaning of ten printed?

&quot;Ten PRINT&quot; commonly refers to a one-line BASIC program that generates a maze-like pattern when executed. This program has become a symbol of creative programming simplicity and has inspired various artistic and creative projects.


How do you write a c program to store 5 names in structures and print them each in one line?

With a text editor, and some basic knowledge of the C programming language.


How do you program a uniden bc144xz scanner?

Follow the link below to download/print an operating manual that will walk you through the programming process: http://www.scribd.com/doc/2056189/UBC144XLT


Write a program in java programming language to print welcome to java programming?

public class welcome { public static void main (String args[]) { System.out.println("Welcome to Java programming"); } } There are also many "Hello World" tutorials you can find elsewhere on the internet


Write a pascal program that compute an area of a triangle?

{A program to compute the area of a triangle} {by Ogboin W. Meshach} Var; b,h:real; BEGIN Writeln('Triangle'); Write('Base: '); Readln(base); Write('Height: '); Readln(height); area:=0.5*base*height; Writeln('Area: ', area :0:2); End.