Hello I am a student and I am trying to write a code that does this
This project will ask a user to input a number for example "please Enter a vaule of N"
and a user types 30 and then the java code will display on the scren like this
0 1 2 3 4 5 6 7 8 9
10 11 12 13 14 15 16 17 18 19
20 21 22 23 24 25 26 27 28 29
same like that and so and so for if he choose a number more than 30 it will show till the number he chose
and it has to print 10 numbers each line
I don't know how to do nothing seems to be working here
is my code
and this is the out put ( hint I chose number 10 for the input )
Let's try this another way. This line doesn't do what you want:
When i=0 and j=0, it prints 0 - good
When i=0 and j=1, it prints 1 - good
When i=0 and j=2, it prints 2 - good
When i=1 and j=0, it prints 1 - not good
When i=1 and j=1, it prints 2 - not good
When i=1 and j=2, it prints 3 - not good
For the three "not good" ones, what do you want printed instead? What is it off by?
Turn your computer off and use a pencil and paper (and eraser, which is an important tool ) to write how you intend to do it. What would the instructions be? When you have those instructions really simple, you will be able to change them into code.
This is not how you help each other! you guys should show us how to do it sicne you guys are expert! each one of you told me to do something that is out of my question you guys could of just showed me and I was going to know what I did wrong
to those who have same problem as I did I was able to fix it here is the code
by providing code as a solution is never going to help in the long run.
I am not an Java expert by any means, but I know that you learn the best only by brainstorming.
Coderanch is there to help every one, but not providing complete code as a solution.
I hope experts agree with me.
evan yousif wrote:This is not how you help each other! you guys should show us how to do it sicne(sic) you guys are expert!
I'm sure you've heard the adage "Give a man a fish he eats for a day. Teach a man to fish he eats for a lifetime." We STRONGLY believe that it is better to teach you how to think through a problem than just spoon feeding you answers. There are other sites that will do that.
Please remember that people here are all volunteers, and give you what time, and what help, they choose - no more, and no less.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors