need help
package com.codegym.task.task18.task1817;
/*
Spaces
*/
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
public class Solution {
public static void main(String[] args) throws IOException {
String par = args[0];
InputStream in = new FileInputStream(par);
int spaces=0;
int rest = in.available();
while(in.available()>0){
int a = in.read();
if(a==32){
spaces++;
}
}
in.close();
double score = (spaces/rest)*100;
double score1 = (double) Math.round(score*100)/100;
System.out.println(score1);
}
}