Can anyone help me with the reading in Java in the PRIME1 problem.
Thanks in advance.

  • created

    Jul '08
  • last reply

    May '09
  • 1

    reply

  • 242

    views

  • 2

    users

9 months later

Hi,

You can read input in java like this:-

BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
int num = Integer.parseInt(bf.readLine());

You can put this line in a for loop and read several times.

Varun

Suggested Topics

Want to read more? Browse other topics in JAVA based languages or view latest topics.