[nbusers] Need help"write a program to print triangular with * "

  • From: "Soonwh" < >
  • To:
  • Subject: [nbusers] Need help"write a program to print triangular with * "
  • Date: Mon, 26 Nov 2012 22:10:11 -0500

I need help to write a program that takes a command-line argument N and print 
and N-by-N triangular pattern as below:-

******
.*****
..****
...***
....**
.....*


i done half of it, but other part i cant get it.

package ass1;

public class Ass1 {

   public static void main(String[] args) 
   
   {
       int x, y ;
       for(x=1; x<=6; x++)
           
       {
           for ( y=1; y<x; y++)
       
       
       {
           System.out.print("*");
       }
       
       {
       System.out.println();
       }   
       
       }
   }






[nbusers] Need help"write a program to print triangular with * "

Soonwh 11/27/2012

[nbusers] Re: Need help"write a program to print triangular with * "

Ion Iovu 11/27/2012

[nbusers] Need help"write a program to print triangular with * "

Soonwh 11/27/2012

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close