-
Notifications
You must be signed in to change notification settings - Fork 205
Expand file tree
/
Copy pathTask02Main.java
More file actions
29 lines (26 loc) · 1.1 KB
/
Task02Main.java
File metadata and controls
29 lines (26 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package com.example.task02;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.*;
import java.io.IOException;
public class Task02Main {
public static void main(String[] args) throws IOException {
// чтобы протестировать свое решение, вам нужно:
// - направить файл input.test в стандартный ввод программы (в настройках запуска программы в IDE или в консоли)
// - направить стандартный вывод программы в файл output.test
// - запустить программу
// - и сравнить получившийся файл output.test с expected.test
int cur = System.in.read();
int next;
while(cur > -1){
next = System.in.read();
if(cur != 13 || next != 10){
System.out.write(cur);
}
cur = next;
}
System.out.flush();
}
}