public class Test2 {
public static void main(String[] args) {
double[] myAry ={35, 23, 234, 165}
System.out.print("Please input a number: ")
double input = new Scanner(System.in).nextDouble()
boolean isFound = false
for(int i = 0i <myAry.lengthi++){
if(myAry[i] == input){
isFound = true
break
}
}
System.out.println(input + " can " + (isFound? "": " not ") +" be found in the ary")
}
}
import java.util.Scanner\r\n\r\npublic class NumTest {\r\n\r\npublic static void main(String[] args) {\r\n\r\nint[] nums=new int[10]\r\nScanner jin = new Scanner(System.in)\r\nfor (int i = 0i nums[i]) {\r\nsmallerNum=nums[i]\r\n}\r\nif (biggerNum 回答于 2022-12-11欢迎分享,转载请注明来源:内存溢出
评论列表(0条)