While Loop Basics

package hlo;
public class While {
public static void main(String[]args) {
int no=2;
//0 //2 //5
----------> while(no<=5) {
"From 2 to 5, inclusive, anything less than or equal to."
System.out.println(no);
no=no+1; //2=2+1 =3
// 3=3+1=4
// 4=4+1=5
}
}
}
package hlo;

public class While {
    public static void main(String[]args) {
        int no=2;

          //0  //2 //5
---------->  while(no<=5) {
    "From 2 to 5, inclusive, anything less than or equal to."
            System.out.println(no);
            no=no+1; //2=2+1 =3
                                 // 3=3+1=4
                                 // 4=4+1=5
        }

    }

}
package hlo; public class While { public static void main(String[]args) { int no=2; //0 //2 //5 ----------> while(no<=5) { "From 2 to 5, inclusive, anything less than or equal to." System.out.println(no); no=no+1; //2=2+1 =3 // 3=3+1=4 // 4=4+1=5 } } }

Enter fullscreen mode Exit fullscreen mode

原文链接:While Loop Basics

© 版权声明
THE END
喜欢就支持一下吧
点赞9 分享
Time such as water, always silent. If you are well, it is sunny.
时光如水,总是无言。若你安好,便是晴天
评论 抢沙发

请登录后发表评论

    暂无评论内容