Search:

Type: Posts; User: MooseManX

Search: Search took 0.10 seconds.

  1. Replies
    19
    Views
    1,386

    Re: How do I do this, code supplied

    public class ArgsLoop {
    public static void main(String[] args) {
    int n = Integer.parseInt(args[0]); // now n=5
    for(int i=0;i<n;i++){
    System.out.println();
    for(int c=i; c>-1; c--){...
  2. Replies
    19
    Views
    1,386

    Re: How do I do this, code supplied

    public class ArgsLoop {
    public static void main(String[] args) {
    int n = Integer.parseInt(args[0]); // now n=5
    for(int i=0;i<n;i++){
    System.out.print("*");
    System.out.println();...
  3. Replies
    19
    Views
    1,386

    Re: How do I do this, code supplied

    public class ArgsLoop {
    public static void main(String[] args) {
    int n = Integer.parseInt(args[0]); // now n=5
    for(int i=0;i<n;i++){
    System.out.println();
    System.out.print("*");...
  4. Replies
    19
    Views
    1,386

    Re: How do I do this, code supplied

    it is posting an extra line e.g

    *
    **
    ***
    ****
    *****
    *****
    that's my output now
  5. Replies
    19
    Views
    1,386

    Re: How do I do this, code supplied

    public class ArgsLoop {
    public static void main(String[] args) {
    int n = Integer.parseInt(args[0]); // now n=5
    for(int i=0;i<n;i++){
    System.out.println("*");
    for(int c=i; c>-1; c--){...
  6. Replies
    19
    Views
    1,386

    Re: How do I do this, code supplied

    for(int i=0;i<n;i++){
    System.out.println("*");

    I fixed the outer loop,
    it runs five times now, but the inner loop still isn't working
  7. Replies
    19
    Views
    1,386

    Re: How do I do this, code supplied

    That's not helping ^. Can you show me how to do it in code, don't you think I have used paper and pen? That's exactly what I wrote in my first post.
    I have been playing around with this code for...
  8. Replies
    19
    Views
    1,386

    Re: How do I do this, code supplied

    public class ArgsLoop {
    public static void main(String[] args) {
    int n = Integer.parseInt(args[0]); // now n=5
    for(int i=1;i<n;i++){
    System.out.println("*");
    for(int c=0; c<i; c++){...
  9. Replies
    19
    Views
    1,386

    How do I do this, code supplied

    Hey I am doing a tutorial at uni and I need to write a code that

    Task 3
    Write a program that accept from the command line number n and then print stars ‘*’ in n rows.
    For example, if n = 5 then...
  10. Thread: Hey

    by MooseManX
    Replies
    1
    Views
    983

    Hey

    Hey I'm a uni student, just need help seeing my tutors have refused to.
Results 1 to 10 of 10