现在,我已经学习了这次的DoWhile循环,但我的问题是扫描仪。我想以字符串的形式接收输入,但当我这样做时在do之外,它表示不能将y或yes解析为变量。一位朋友推荐了switch cases,你觉得呢?String a = sc.nextLine(); wow(); //My method name
}while(a == y); //Error is here
因此,它本质上是"6-4“、"7-6”、"11-7“、"12-11”、"17-12“、"22-17”、"25-22“。我尝试使用"while“循环,但没有收到任何输出,也没有错误消息。B = length(A); %will output the length of A, which is 8
X = A(i, 1); %set X equal to"row i" and column 1
Y