Search:

Type: Posts; User: Norm

Search: Search took 0.10 seconds.

  1. Re: Help in making an output for this Graphic (newbie)

    You're welcome.
    Get a good sleep and try again tomorrow.
  2. Re: Help in making an output for this Graphic (newbie)

    Come on back when you have had time to write the code.
    See post#42 It has as simple a suggestion as I can make.
  3. Re: Help in making an output for this Graphic (newbie)

    Your code shown in the first post does it.

    I guess you should give up for now and try later.
  4. Re: Help in making an output for this Graphic (newbie)

    Try a very simple exercise:
    Write a loop to print x number of "*" on a line.
    If x is 0 you print none,
    if x is 1 you print 1
    if x is 2 you print 2
    etc
  5. Re: Help in making an output for this Graphic (newbie)

    There are no true or false statements in this problem. It is done with loops and math.
  6. Re: Help in making an output for this Graphic (newbie)

    Try it and see what happens.

    What is it you want those two statements to do?
    Can they be merged into a single statement?
  7. Re: Help in making an output for this Graphic (newbie)

    Now add code to print out the next lines: 2 to 5.
    You need a loop for the spaces and a loop for the *s
  8. Re: Help in making an output for this Graphic (newbie)

    Ok. Thats a start. You've printed the first line with some spaces and some *s
    Now add code to print out the next lines.
    You need a loop for the spaces and a loop for the *s

    Can you explain why...
  9. Re: Help in making an output for this Graphic (newbie)

    There is no boolean variable involved in this logic. It is only loops and math.
  10. Re: Help in making an output for this Graphic (newbie)

    Compile and execute it and see what is printed.
  11. Re: Help in making an output for this Graphic (newbie)

    What have you tried? Post your code that shows the problem.
  12. Re: Help in making an output for this Graphic (newbie)

    What happens when you compile and execute your code?

    y is an integer, like 4. If you print 4 *s the printout would be: ****
    You already have the code for that in your first two programs.
  13. Re: Help in making an output for this Graphic (newbie)

    First do the steps I asked you to do in post#17
    What do you need to print for the first line? Some spaces and some *s.
    Two parts:
    One print x spaces: what is the code for that?
    Two print y *s:...
  14. Re: Help in making an output for this Graphic (newbie)

    No. x and y are numbers. like 4 and 1 then 3 and 2 etc

    Answer me this question: Do you want to learn programming?
    If so, you'll need to learn to think like a computer operates.
  15. Re: Help in making an output for this Graphic (newbie)

    Do the project a small bit at a time.
    Write down on paper the steps to print out the first line. See post #10.
    What do you need to print for the first line? Some spaces and some *s.
    Two parts:...
  16. Re: Help in making an output for this Graphic (newbie)

    System.out.print(" "); // prints a single/empty space

    Look at the code you posted already. It prints a different number of *s on each line. Hint: it takes a loop
  17. Re: Help in making an output for this Graphic (newbie)

    Part of your problem could be using the wrong variable names and no comments.
    Here is the second assignment with comments and new names:



    int nbrRows=5;
    // Print on nbrRows
    ...
  18. Re: Help in making an output for this Graphic (newbie)

    Have you looked at the problem of what is being printed line by line?
    What goes on the first line? Some spaces and some *s
    What goes on the second line? A different number of spaces and *s

    How...
  19. Re: Help in making an output for this Graphic (newbie)

    What work have you done on the problem?
  20. Re: Help in making an output for this Graphic (newbie)

    Have you solved it now? Your post doesn't really say?
  21. Re: Help in making an output for this Graphic (newbie)

    Draw the designs you want to print, look at where the spaces are and where the *s are.
    Design code that will output the required number of spaces and the number of *s on each line.

    Your current...
Results 1 to 21 of 21