CopyPastor

Detecting plagiarism made easy.

Score: 0.7871668080800907; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2019-07-04
by ORBIT

Original Post

Original - Posted on 2019-03-30
by Nasar



            
Present in both answers; Present only in the new answer; Present only in the old answer;

Try these using `stdin.hasNext()`

import java.io.BufferedInputStream; import java.util.Scanner; public class ReadMultiline { public static void main(String args[]) { Scanner stdinput = new Scanner(new BufferedInputStream(System.in)); while (stdinput.hasNext()) { System.out.println(Math.abs(stdinput.nextLong() - stdinput.nextLong())); String s=scanner.next(); } } }
This is good for taking multiple line input
import java.util.Scanner; public class JavaApp { public static void main(String[] args){ Scanner scanner = new Scanner(System.in); String line; while(true){ line = scanner.nextLine(); System.out.println(line); if(line.equals("")){ break; } } } }

        
Present in both answers; Present only in the new answer; Present only in the old answer;