Plz help me to write a program in java


#1

hi

I recently started learning java language. Yesterday our sir has given us assignment in which there is a program like write java program to show using star

*

**

***

****

*****

and

*

***

*****

*******

*********

*******

*****

***

*


#2

Don't ask people to do your assignments for you. Ask specific questions.

What have you done till now?

Is there something you don't understand? Something you don't know how to do?


#3

*Knock Knock*

Q: Who's there?

-long pause-

A: A Java program

:D


#4

dude all i can say is, ARRAYS and LOOPS


#5

System.out.print(" *") ;

System.out.print(" **") ;

System.out.print(" ***") ;

System.out.print(" ***") ;

and so on ...

Its very easy ...

On a serious note , see Sah's comment and don't try to directly open computer and sit and code. Pick copy/pencil think on the logic that would be required to achieve this, should not take long, and then code it in 2 mins.


#6

[quote=", post:, topic:"]

System.out.print(" *") ;

System.out.print(" **") ;

System.out.print(" ***") ;

System.out.print(" ***") ;

and so on …

Its very easy …

On a serious note , see Sah’s comment and don’t try to directly open computer and sit and code. Pick copy/pencil think on the logic that would be required to achieve this, should not take long, and then code it in 2 mins.

[/quote]

Riz i dont think he was supposed to just print it like that, i was given the same assignment once and was told not to just print like that :D


#7

i did a C++ plus plus program which was same thing as this...

unfortunately i lost the code.. otherwise i wud have give you that..

you can do it .. its very simple.. try it yourself..


#8

make this program using loos plzz help


#9

hey bro.. guess what i found the program i made.. :)

here is the exe file... enjoy playing with it... :P

http://www.mediafire.com/?dnpi5xrh5b65205


#10

Cant really help you, but I could leave a hint:

Q1. Use a For Loop with and then an if statement in which you input values in a fixed array starting from........

Q2. Similar as previous but you can use 2 while loops (Array is filled with values and on second removing values).

If you are unable to do this then write down what you have attempted and then we will guide you onwards.