package com.javarush.task.task18.task1820;
/*
Округление чисел
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws IOException{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
FileInputStream streamIn = new FileInputStream(reader.readLine());
FileOutputStream streamOut = new FileOutputStream(reader.readLine());
byte [] arr = new byte[streamIn.available()];//[streamIn.getChannel().size()];
//int g = Integer.parseInt(reader.readLine());
int f = 0;
int i = 0;
while(streamIn.available()>0){
arr[i]=(byte)streamIn.read();
i++;
}
for(int j = 0; j < arr.length; j++){
if(arr[j]!=' '){
streamOut.write(Math.round(arr[j]));
}
else
streamOut.write(arr[j]);
}
streamIn.close();
streamOut.close();
}
}
package com.javarush.task.task18.task1820;
/*
Округление чисел
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws IOException{
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
FileInputStream streamIn = new FileInputStream(reader.readLine());
FileOutputStream streamOut = new FileOutputStream(reader.readLine());
byte [] arr = new byte[streamIn.available()];//[streamIn.getChannel().size()];
//int g = Integer.parseInt(reader.readLine());
int f = 0;
int i = 0;
while(streamIn.available()>0){
arr[i]=(byte)streamIn.read();
i++;
}
for(int j = 0; j < arr.length; j++){
if(arr[j]!=' '){
streamOut.write(Math.round(arr[j]));
//streamOut.write(Integer.toString(arr[j]).getBytes());//here must be int, but it will write ->byte
}
else
streamOut.write(arr[j]);
}
//streamOut.write(Math.round(f));
streamIn.close();
streamOut.close();
}
}