I have to create an input file in which the user has to input 5 integers with one whitespace between each number… all on the same line (this list of numbers is the set). And then on the next 3 lines input 3 coordinate points (x1, y1) , (x2, y2), (x3, y3).

So the input format would look like this:

1 3 5 6 9

(4, 7)

(2, 3)

(2, 9)

what about the part where i have to combine parentheses with commas as part of the input and only extract the numerical part of the input for use in determining whether the coordinates match a viable function for the given set?

So far this is all I have and idk how to make it so that you can enter whitespaces or for it to all happen on one line..

public static void main(String[] args)

    Scanner input = new Scanner(System.in);
    int a;
    int b;
    int c;
    int m;
    int n;
    System.out.println ("Enter your 5 numbers:");
    a = input.nextInt();
    b = input.nextInt();

Leave a reply

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>