JAVA的问题!!!急!!!
来源:百度知道 编辑:UC知道 时间:2024/06/12 14:47:15
public class HelloAccp{
public static void main(String[] args) {
int i = 100;
while (i <= 100) {
使用循环输出:100.95.90.85......5.
public static void main(String[] args) {
int i = 100;
while (i <= 100) {
使用循环输出:100.95.90.85......5.
public class HelloAccp{
public static void main(String[] args) {
int i = 100;
while (i >0) {
System.out.print(i+".");
i=i-5;
}
}
}
//使用循环输出:100.95.90.85......5.
public class HelloAccp{
public static void main(String[] args) {
int i = 100;
while (i <= 100) {
System.out.print(i+".");
i-=5;
if(i<=0)break;//这样循环才能结束,
}
public class HelloAccp{
public static void main(String[] args) {
int i = 100;
while (i <= 100) {
System.out.print(i+".");
i=i-5;
if(i<=5)
{
break;
}
}
}
while(i<=100){
if(i>5){
System.out.print(i);
i=i-5;
}
}
已经测试过了,是正确的。
while(i<=100){
if(i>5){
System.out.print(i);
i=i-5;
}
}
while (i <= 100) {
System.out.print((i-=5)+&