My solution works when I use run. I get the window to input three numbers and the code executes cleanly and displays the proper output. When I try to verify, it gives an error saying no input and two errors saying that I forgot a period in the output. ???
Thanks.
package com.codegym.task.task04.task0415;
/*
Rule of the triangle
*/
import java.io.*;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
public class Solution {
public static void main(String[] args) throws Exception {
InputStream inputStream = System.in;
Reader inputStreamReader = new InputStreamReader(inputStream);
BufferedReader br = new BufferedReader(inputStreamReader);
String sides = br.readLine(); // to read multiple integers line
String[] three = new String[3];
three = sides.split("");
int a = Integer.parseInt(three[0]);
int b = Integer.parseInt(three[1]);
int c = Integer.parseInt(three[2]);
if(a+b>c && b+c>a && a+c>b) {
System.out.println("The triangle is possible.");
} else {
System.out.println("The triangle is not possible.");
}
}
}