Search:

Type: Posts; User: jslice3

Search: Search took 0.47 seconds.

  1. [SOLVED] Re: program reads file and prints runs of the same numbers in the form (number of times * number)

    my input file is ten 20s, five 50s, five 60s, one 20, five 30s, and a 0 in a row
    but my output is
    (1 * 50)
    (1 * 60)
    (1 * 20)
    (1 * 30)
    (0)

    ive read over my code multiple times and still dont...
  2. [SOLVED] Re: program reads file and prints runs of the same numbers in the form (number of times * number)

    oh yeah I did, and am still working on it, i was just trying to get a visual layout of what you were saying
  3. [SOLVED] Re: program reads file and prints runs of the same numbers in the form (number of times * number)

    so something like this?



    import java.util.*;
    import java.io.*;

    public class Proj57015 {

    public static void main (String [] args) throws FileNotFoundException{
  4. [SOLVED] Re: program reads file and prints runs of the same numbers in the form (number of times * number)

    sorry, i was wondering why that wasnt working, it said to do that in the "announcements - read if its your first time"



    import java.util.*;
    import java.io.*;

    public class Proj57015 {
    ...
  5. [SOLVED] Re: program reads file and prints runs of the same numbers in the form (number of times * number)

    ok that makes sense, but then how would i go about assigning the next number of a sequence if i cant call .nextInt again?
  6. [SOLVED] program reads file and prints runs of the same numbers in the form (number of times * number)

    so i need the program to read a file with a list of ints, if there are consecutive equal numbers, such as 10 20 20 20 20 30 30 ... 0, the output should be
    (1 * 10)
    (4 * 20)
    (2 * 30)
    etc, and it...
Results 1 to 6 of 6