java ! write a program to putout the perfect squares between

java ! write a program to putout the perfect squares between X and Y.the out put should be in rows
of 5 numbers.X and Y are input values.
sample input x->2 input y->20
output->
4 9 16 25 36 49 64 81 100 121
跪求啦
must be finish before 4:30
上当不等于受骗 1年前 已收到1个回答 举报

猫鼠结盟 幼苗

共回答了15个问题采纳率:93.3% 举报

签到练习
import java.util.Scanner;
public class Test{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
System.out.print("input x->");
int x=sc.nextInt();
System.out.print("input y->");
int y=sc.nextInt();
for(int i=x;i2
input y->20
4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400

1年前

1
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 16 q. 0.020 s. - webmaster@yulucn.com