📄 count.java
字号:
yimport java.io.*;
class count{
static int a,b,c;
public static void main(String[] args){
try{
InputStreamReader in =new InputStreamReader(System.in);
InputStreamReader ine= new InputStreamReader(System.in);
//InputStreamReader inr= new InputStreamReader(System.in);
BufferedReader one =new BufferedReader(in);
BufferedReader tow =new BufferedReader(ine);
// BufferedReader three =new BufferedReader(inr);
System.out.println("please input your first number:");
a=Integer.parseInt(one.readLine());
System.out.println("please input your second number:");
b=Integer.parseInt(tow.readLine());
//System.out.println("please input opert:");
//c=Integer.parseInt(three.readLine());
sum count =new sum(a,b);
//count.counter(a,b);
System.out.println("the end ");
}
catch(IOException e){
//e.getMessgae();
// System.out.println("你输入的不是数据在是其它的字符,请检查:");
}
}
}
class sum{
//public int a,b,c,d;
public int a,b;
public sum(int x,int y){
this.a=x;
this.b=y;
System.out.println("两数的和为:"+(a+b));
/* this.c=z;
// switch(c){
// case '1':
d = a + b;
System.out.println("两数的和为:"+d);break;
case '2':
d = a - b;
System.out.println("两数的差为:"+d);break;
case '3':
d = a*b ;
System.out.println("两数的积为:"+d);break;
case '4':
d= a / b;
System.out.println("两数的商为:"+d);break;
default :System.out.println("you input must be the right:");
}*/
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -