Search:

Type: Posts; User: xdx

Search: Search took 0.30 seconds.

  1. Replies
    1
    Views
    372

    Can't figure out what's wrong

    Question.
    The user should input non negative integers, These values must be filled in an array of 10 elements. If the user enters -1, or the array becomes full whatever comes first, the program...
  2. Thread: Help with Arrays

    by xdx
    Replies
    3
    Views
    309

    Re: Help with Arrays

    I did figure that out but I have tried many ways to implement it but nothing seems to work so far.


    while (i <= 3){
    System.out.println("Enter a non-negative integer:");
    userInput =...
  3. Thread: Help with Arrays

    by xdx
    Replies
    3
    Views
    309

    Help with Arrays

    please note that I can only use loops
    I need to code a program which prompts the user to input integers. When the user enters three unique integers, the program should stop and display the unique...
  4. Replies
    5
    Views
    484

    Re: A simple mistake I can't fix

    Thanks a lot as I have figured out that the problem was using the != assignment, Should have used !userInput equals(exit).
    Also, I do want to apologise to all the viewers, especially jps for not...
  5. Replies
    5
    Views
    484

    Re: A simple mistake I can't fix

    Hello,
    Thanks for your insight. The only problem my program has is the while loop. The program should keep on asking userInput and calculate uppercase and lowercase characters until the user types...
  6. Replies
    5
    Views
    484

    A simple mistake I can't fix

    String userInput;

    int lowerCase = 0, upperCase = 0;
    Scanner scan = new Scanner (System.in);

    System.out.println("Enter a word (type exit to finish) : ");

    userInput =...
  7. Need help with nested for loops to print the following number pattern

    1
    2, 1
    1, 2, 3
    4, 3, 2, 1
    ...............
    .................
    ....................
    ...................... (upto 10)

    notice the absence of comma at the end of the last integer
Results 1 to 7 of 7