-
java progaram
Dear Friends,
I am new to java and i faced one program.Can any one just help me getting output for this program given below:
a
a b
a b c
a b c d
a b c d e
a b c d e f
a b c d e
a b c d
a b c
a b
a
how can we get this out using for loop.please help me.Thank you!!!
-
Re: java progaram
I think it's the easiest to split your 'problem' in two parts: the top part and the bottom part; number the lines from 0 to 5 (top to bottom) and the positions (from left to right) 0 to 5; for a line i and a position j, try to figure out the character at that position. If you have solved all that, it is easy to solve the entire bottom part of your problem.
kind regards,
Jos
-
Re: java progaram
Here is the code to perform the function u described. I did it in a hurry so id double check it, plus Im leaving it up to you to discover what I did, so that you understand better. Ill just give you a hint, its possible to look at char to their ASCII (or unicode) number values
-
Re: java progaram
@Rewry, this is what we call spoon feeding. We don't do that here. JosAH described how he can accomplish this, but provided no code. This is how we prefer our questions to be answered. If your code works, and he uses it (Copy pasta), then he learns nothing. What did that accomplish? You just hurt someone learning the basics by not forcing them to think and understand how this stuff works. Until you are forced to figure it out by yourself, maybe with guidance but not spoon fed, you will not learn anything to its full extent.
-
Re: java progaram
Sorry first day using this forum. I didnt know was just trying to help...wont happen again
-
Re: java progaram
I couldn't see any code here and i have tried this code many times but didn't get the output,i am new to java.I understand everyone saying for my welfare,not to spoon feed.can you please send me this code to my id [email removed]@gmail.com, it will be so useful to get an idea and develop further and others too thanks for the reply!!!!
-
Re: java progaram
Moderator advice: Don't post your email address on a public forum and don't blatantly ask to be spoonfed. Also, don't solicit off-forum communication, as that defeats the very purpose of a forum, which is to share problems and their potential solutions.
db