?? iomanager.java
字號:
import java.util.*;
public class IOManager
{
//-------------FIELDS-----------------
private static Scanner input = new Scanner(System.in);
//----------------METHOD---------------
public static void dowork(){
//Input a
System.out.println("Please input the value of coefficient a:");
double a =input.nextDouble();
//When a is within the range of -100 to 100
if ((a>=-100)&&(a<=100))
{
//Input b
System.out.println("Please input the value of coefficient b:");
double b =input.nextDouble();
//When b is within the range of -100 to 100
if ((b>=-100)&&(b<=100))
{
//Input c
System.out.println("Please input the value of coefficient c:");
double c =input.nextDouble();
//When c is within the range of -100 to 100
if ((c>=-100)&&(c<=100))
{
QuadraticEquation newQuadraticEquation=new QuadraticEquation(a,b,c);
QuadraticEquation.calcRoot();
}
else
{ System.out.println("Error! Please check your input."); }
}
else
{ System.out.println("Error! Please check your input."); }
}
else
{ System.out.println("Error! Please check your input."); }
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -