I am a bit confused with this task.
I have not found yet something that reads numbers in a file. Do I have to take the bytes, change them into numbers and then round them, turn them back into bytes and store them? How do I know the representation of the number in bytes?
Thanks for your help!
package com.codegym.task.task18.task1820;
/*
Rounding numbers
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws FileNotFoundException, IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String fn1 = reader.readLine();
String fn2 = reader.readLine();
FileInputStream inputStream = new FileInputStream(fn1);
FileOutputStream outputStream = new FileOutputStream(fn2);
while(inputStream.available()>0){
int data = inputStream.read();
}
outputStream.close();
inputStream.close();
}
}