大神呐!救救我吧!我真的不知道哪里错了,就是总是抱错27行。新人求抱大腿。
import java.util.Scanner;
public class ShuRu{
public static void main(String[] args){
Scanner sum=new Scanner(System.in);
System.out.println("请输入一个三位数");
int one=sum.nextInt();
System.out.println("请再输入一个三位数");
int two=sum.nextInt();
if (one<=999&&one>=100&&two<=999&&two>=100) {
int oneshi=(one%100)/10;//one十位
int twoshi=(two%100)/10;//two十位
if (twoshi!=0) {
double shang=oneshi/twoshi;
}else{
if (oneshi!=0) {
double shang=twoshi/oneshi;
}else{
System.out.println("不能运算");
}
}
}else{
System.out.println("输入的位数错误");
}
System.out.println("商为:"+shang);
}
}

求助不知道代码哪里出错了!
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-