Search:

Type: Posts; User: Norm

Search: Search took 0.38 seconds.

  1. Replies
    20
    Views
    2,205

    Re: how to count and print asterisk.

    Your logic will have to print the rows starting at the top, build each row column by column, inserting an * when a column should have an *. There would be as many rows as the tallest column to be...
  2. Replies
    20
    Views
    2,205

    Re: how to count and print asterisk.

    What does the output from the program look like? How is it different from what you want?

    The posted code is poorly formatted. The ending }s should not be HIDDEN at the end of a statement.
    All...
  3. Replies
    20
    Views
    2,205

    Re: how to count and print asterisk.

    Please explain what you mean by "align".
    what do you want the output to look like?
    Put the output in code tags to preserve its formatting.

    1
    2
    4
    8
  4. Replies
    20
    Views
    2,205

    Re: how to count and print asterisk.

    If you have a question about some code, post the code and your questions.
  5. Replies
    20
    Views
    2,205

    Re: how to count and print asterisk.

    The printf() method has formatting capabilities that would help you have spaces to make the columns align.
  6. Replies
    20
    Views
    2,205

    Re: how to count and print asterisk.

    You would need a special loop at the place where you want to print the *s.
    You'd probably want to write a method to do it that you would pass the number of *s to be printed as its arg.
  7. Replies
    20
    Views
    2,205

    Re: how to count and print asterisk.

    You can't. Use the int value to control the loop with the print("*") inside it.
  8. Replies
    20
    Views
    2,205

    Re: how to count and print asterisk.

    If the *s are being printed, look at using the print() method inside a loop to print *s all on one line.
    Then use the println() method to move to the next line.
  9. Replies
    20
    Views
    2,205

    Re: how to count and print asterisk.

    please explain. If the count is 3 how would that be converted?
  10. Replies
    20
    Views
    2,205

    Re: how to count and print asterisk.

    What is the "it" that is being counted?
    Does the program's output show the problem? If so, copy the output here and add some comments to it that shows what is wrong with the output and show what...
Results 1 to 10 of 10