Triangle program

Triangle program

1

121 12321 1234321 123454321

kindly give the code 4 this program in java

View Answers

March 26, 2013 at 2:46 PM

1 121 12321 1234321 write a program for this triangle


March 26, 2013 at 2:46 PM

class Tri{

public static void main(String args[]){

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

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

    System.out.print(" ");
    }

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

    System.out.print(k);
    }

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

    System.out.print(i-l);
    }
System.out.println();

} } }









Related Tutorials/Questions & Answers:
Triangle program
a program for this triangle    1 121 12321 1234321 write a program for this triangle    1 121 12321 1234321 write a program...Triangle program  1 121 12321 1234321 123454321 kindly give
Triangle Program
Triangle Program  i want program code for 1 2 3 4 5 6 7 8 9 10 any body please help me   public class Triangle { public static void main(String[] args
Advertisements
A Program To Print A Equilateral Triangle
A Program To Print A Equilateral Triangle  Write A program to Print Following In Java : 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
Java Program Floyd's Triangle
Java Program Floyd's Triangle In this section you will read about how to write a Java program to print Floyd's triangle. This tutorial is about... for creating the Floyd's triangle in Java. Before writing a Java program
C Program to Print Pascal Triangle - Development process
C Program to Print Pascal Triangle  I want C Program to Print Pascal Triangle.  Hi Friend, Try the following code: #include #include void main(){ int a[15][15],i,j,rows,num=25,k; printf("\n enter
triangle
triangle  Write a program that makes use of a class called... the sides of a triangle If they can form a triangle, determine and print if they can also form the sides of a right-angle triangle The class should include proper data
triangle
triangle  how to draw triangle numbers with stars in html with the help of javascript
Write a program to construct a triangle with the ?*?
Write a program to construct a triangle... programming will teach you the coding for constructing a shape of triangle by using '*'. First of all make a class named 'triangle' under the Java I/O package
triangle output
triangle output  program to get the following output
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
triangle output
triangle output  program to get the following output: * *   Hi Friend, Please specify the pattern properly.ADS_TO_REPLACE_1 Thanks
pascal triangle
pascal triangle   given string : char str[]="123456789"; write a program in 'c'-language that displays the following: 1 232... the following link:ADS_TO_REPLACE_1 C Pascal's Triangle Thanks
Triangle problem
Triangle problem  what's the logic for create pattern program how can i create any pattern program with in minute. like this 1 2 5 3 6 8 4 7 9 10
ModuleNotFoundError: No module named 'triangle'
ModuleNotFoundError: No module named 'triangle'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'triangle' How to remove the ModuleNotFoundError: No module named 'triangle
Triangle pgm
Triangle pgm  how to write code fa this??? 1 222 33333 4444444 55555555 666666666
Code for a triangle.....
Code for a triangle.....   1 1 5 1 1 5 25 5 1 What is the source Code for above output
triangle shape
triangle shape  Hi, I have to create a program which its output is: + ++ +++ ++++ and this what I did so far : package symbols; import java.util.*; public class Symbols { public static void main(String[] args) { Scanner
ModuleNotFoundError: No module named 'Pascal_Triangle'
ModuleNotFoundError: No module named 'Pascal_Triangle'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'Pascal_Triangle' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'Pascal_Triangle'
ModuleNotFoundError: No module named 'Pascal_Triangle'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'Pascal_Triangle' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'right-triangle'
ModuleNotFoundError: No module named 'right-triangle'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'right-triangle' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'triangle_plot'
ModuleNotFoundError: No module named 'triangle_plot'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'triangle_plot' How to remove the ModuleNotFoundError: No module named
ModuleNotFoundError: No module named 'Flask-Triangle'
ModuleNotFoundError: No module named 'Flask-Triangle'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'Flask-Triangle' How to remove the ModuleNotFoundError: No module named
Golden triangle tours
Golden triangle tours  Hi, Can anyone tell me something about Golden triangle tours? Thanks   Hi, Golden Triangle tour cover Delhi, Agra and Jaipur. Please check India Golden Triangle Tours. Thanks
Golden Triangle Tours
Golden Triangle Tours  What is golden triangle tours ..and how it is related to the Agra and Jaipur and Delhi trip? Please explain me. Thanks
How to calculate area of triangle
java programming tutorial program in the section you see that how to get triangle... will calculate the area of triangle. Then the program perform and  return... Area of Triangle      
how to perform a equqlity triangle in java
how to perform a equqlity triangle in java  below the output 1 2 3 4 6 5 7 9 10 8
TRIANGLE OF *S AT THE BOTTOM RIGHT!!! - Java Beginners
TRIANGLE OF *S AT THE BOTTOM RIGHT!!!  My Question is to : "Write a program that inputs one integer m and outputs an m-line high triangle of *'s... to make the triangle at the right side but couldn't do so. Can you please solve
Java create triangle pattern
Java create triangle pattern In this tutorial, you will learn how to create a triangle shape. For this, user is allowed to enter number of lines to display the triangle of that length and a symbol to show the triangle in a particular
java program - Java Beginners
of the triangle and then the program; a)First determines whether the 3 integers entered represent the sides of a right-angled triangle, equilateral triangle, isosceles...java program  what is the program the a simple program in Java
Java draw triangle draw method?
Java draw triangle draw method?  hi how would i construct the draw method for an triangle using the 'public void draw (graphics g ) method? im...; Here is an example that draws a triangle using drawPolygon method. import
program
program  any program of hotel or school management
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
program
program  program of jdbc using ms access for creating table
program
program  write a html program in show table and this word in box
program
program  write a program different between to dates in terms of days in java
program
program  write a javascript program to create a application form with validation
how to perform a equqlity triangle in java
how to perform a equqlity triangle in java  below the output 1 2 3 4 6 5 7 9 10 8   Here is an example of pattern like 1 2 3 4 5 6 7 8 9 10 Example : public class NumberTriangleClass{ public static void
program
program  WAP a java program to form 1/2+3/4+5/6+7/8 series
program
program   Write a program to find the difference between sum of the squares and the square of the sums of n numbers
program
program  write a program reversee a string. input-hi this is roseindia output-roseindia is this hi
program
program  develop a servlet to insert the data in the database from our program in the table stored in the database
program
program   An old-style movie theater has a simple profit program. Each customer pays $5 per ticket. Every performance costs the theater $20, plus $.50 per attendee. Develop the program calculateTotalProfit that consumes
program
program  write a java program to input a no. and print wheather the no. is a special no or not. (special no. are those no whose factorial of the sum of digit of the no is same as the original
program
program  Develop the program calculateCylinderArea, which accepts radius of the cylinder's base disk and its height and computes surface area of the cylinder
program
program  explanation of program on extending thread class   Hi Friend, Please go through the following link:ADS_TO_REPLACE_1 Java Threads Thanks
program
program  Develop a program that computes the distance a boat travels across a river, given the width of the river, the boat's speed perpendicular to the river, and the river's speed. Speed is distance/time, and the Pythagorean
program
program  how to improve programming skills plss tell some tips..i am understanding concepts but unable to write program so,pls give some guideness plsss
Program
Program  a program to prove that default constructor of super class is available to subclass by default. Define a parameterize constructor for super class to store name = â??Tommyâ?? age=â??23â?? and call this constructor
Program
Program  a program to create two classes Commercial and Domestic. Override the method calculatebill() of Commercial class(Rs.8 per unit) into Domestic class(Rs 6 per unit) to compute electricity bill for both classes
program
program  no i want a program that shows how merge sort algorithm works in graphical representations like numbers are taken in circles and computation... in rectangles or circles wat ever it may be. the theme of program is to show algorithm

Ads