Search:

Type: Posts; User: caustin89

Search: Search took 0.09 seconds.

  1. Re: Beginnner Java, Assignment Help (Ending a code)

    This is my first time programming. And my first program. My logic will probably be off.. but I can't understand your post Hamenopi. Sorry
  2. Re: Beginnner Java, Assignment Help (Ending a code)

    import java.util.Scanner;
    public class Assignment1 {

    public static void main(String[] args) {

    int number;
    Scanner input = new Scanner (System.in);
    System.out.print("Please enter a...
  3. Re: Beginnner Java, Assignment Help (Ending a code)

    I tried system.exit(0), after the if statement's that determine the number is less or more than 5 digits. But that will end the program even if the user enters 5 digits. So the problem I am having is...
  4. Re: Beginnner Java, Assignment Help (Ending a code)

    I believe I had. The first part is correct (When a user enters 5 digits).

    Now when the user enters an incorrect number (anything other than 5 digits). I want an error message to occur, and solely...
  5. Re: Beginnner Java, Assignment Help (Ending a code)

    Please enter a 5 digit number: 45632
    Thank you.

    The individual digits of this number are:
    1st Digit: 4
    2nd Digit: 5
    3rd Digit: 6
    4th Digit: 3
    5th Digit: 2
  6. Re: Beginnner Java, Assignment Help (Ending a code)

    3170

    I have attached what happens when I run. The picture on the top is what its supposed to look like, when they enter the right amount of digits.
    The picture inside the bold box is what...
  7. Re: Beginnner Java, Assignment Help (Ending a code)

    Sorry, I forgot this code at the end.


    System.out.print("\n");
    System.out.println("Your number listed as a String: " + myString);

    The teacher wanted us to to display the...
  8. Re: Beginnner Java, Assignment Help (Ending a code)

    Here it is in text:


    public static void main(String[] args) {

    int number;

    Scanner input = new Scanner (System.in);
    System.out.print("Please enter a 5 digit number: ");
  9. Beginnner Java, Assignment Help (Ending a code)

    So I am currently writing my first assignment and have run into problems with my coding. The task was to have someone enter a 5 digit number and in return, I list each number on their respective...
Results 1 to 9 of 9