All things are lawful, but not all things are profitable.
All things are lawful, but not all things are profitable.
I think Carey Junilu means that the space in line 74 should be changed to a dot so that you can see how the actual spacing is working.
None. You have sorted numbers within an array already before you printing them out. Your problem is, that probably you aren't printing them in the right order, or simply - printing from the other end. Don't know now as haven't seen your code. Anyway, posting your code won't help much. You need either start over, by expecting exercise will start making sense, or put this exercise away and come back to it after some time, maybe it is too complicated for you at the moment.sai rama krishna wrote:which collection object should i use for ascending order number result in rows?
which appears on the contents page of this forum. It doesn't help people to provide them with a complete solution; in fact it may deprive them of the opportunity to learn for themselves. Don't be annoyed, but I have pulled rank and removed your solution.We're all here to learn, so when responding to others, please focus on helping them discover their own solutions, instead of simply providing answers.
Your indentation is incorrect partially because you are using tabs and partially because it is inconsistent. Look at lines 3 and 5.That is an incorrect form for an Java® identitier; it should not contain underscores. Use forLoop instead. But when you are having difficulty writing loops in the first place, why make life more difficult for yourself by giving your class a package name?Nonononononononono. Never use i = i++ which is a notorious pitfall causing i to revert to its original value. That is why you used i++ twice.sai rama krishna wrote:
numbers...
0 1 2 3 4 5 6 7 8 9
You would appear not to have read what I said about for loops. Declare the loop variable inside the loop not before it. You are writing Java® not C. Start from 0; there is no need to change to 1. And don't use 10 if you want to go up to 9:-To get this printedsai rama krishna wrote:. . .. . .
you will have to work out how to calculate the right number from the left number. The left number is i in that particular run through the loop and the right number is your printout. Remember n is 9 and you are printing a total of 17 numbers, as you can tell from the line numbers.That will print a diamond eventually. If you are only printing the top half, you might only need the easy part of the loop. But you will need to print other numbers. More about that to follow.1 2 3 4 5 6 7 8 9 8 7 6 5 4 3 2 1
4so max and min may both be unnecessary.
sai rama krishna wrote:i am giving input from console so i need to use scanner and change to integer array and then string aray then sort etc
sai rama krishna wrote:i am giving input from console so i need to use scanner and change to integer array and then string aray then sort etc
incandescent light gives off an efficient form of heat. You must be THIS smart to ride this ride. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|