Hello everyone,
I cant quite make out what my issue is. Ive looked at some of the other questions raised about this problem. I still cant quite make it out. Your assistance is greatly appreciated. Mike

package com.codegym.task.task18.task1817;
/*
Spaces
*/
import java.io.FileInputStream;
import java.io.IOException;
public class Solution {
public static void main(String[] args) throws IOException {
String fileName = args[0];
FileInputStream inStream = new FileInputStream(fileName);
int n1 = 0;
int n2 = 0;
while(inStream.available() > 0){
int data = inStream.read();
if (data == 32)
n2++;
else
n1++;
}
inStream.close();
double result = (double) (n2/n1)*100;
System.out.println(Math.round(result*100.0)/100.0);
}
}

a bc d eThe count for n1 would be 8 while the count for n2 would be 3. The correct ratio output would should be 37.5,