代码拉取完成,页面将自动刷新
import java.util.Scanner;
public class first {
public static int dajiegou(int a,int b,int answer2){
int c;
if (answer2 == 1) {
c = a + b;
return c;
}
if (answer2 == 2) {
c = a - b;
return c;
}
if (answer2 == 3) {
c = a * b;
return c;
}
if (answer2 == 4) {
c = a % b;
return c;
}
return 1;}}
/* public static void main(String[] args) {
int a, b, c = 0,w=0,i=0;
Scanner scan = new Scanner(System.in);
for(i=0;;i++){
a = scan.nextInt();
b = scan.nextInt();
System.out.println("which means do you want to use?1 for +;2 for -;3 for *;4 for %;");
int answer1 = scan.nextInt();
if (answer1 == 1) {
c = a + b;
}
if (answer1 == 2) {
c = a - b;
}
if (answer1 == 3) {
c = a * b;
}
if (answer1 == 4) {
c = a % b;
}
System.out.println("the result is:" + c);
System.out.println("do you want continue?1 for Y;01 for N");
w=scan.nextInt();
if(w==0)break;}
}*/
//}
/*
public class first{
public static void main(String[] args){
int i =5;
int j =6;
int sum = add(i,j);
System.out.println(sum);
sum =0;
for(i=0;i<100;i++)
sum += i;
System.out.println(sum);
}
public static int add(int augend,int addend){
int sum = augend + addend;
return sum;
}
}*/
/*
public class first{
public static String numberchange(int grade){
if (grade < 60)
return("不及格");
else if(grade < 70)
return("及格");
else if (grade < 80)
return("中等");
else if (grade < 90)
return("良好");
else if (grade <= 100)
return("优秀");
else return("错误");
}
}*/
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。