java实验3.4(用循环语句)

时间:2014-01-31 13:58:53
【文件属性】:

文件名称:java实验3.4(用循环语句)

文件大小:3KB

文件格式:RAR

更新时间:2014-01-31 13:58:53

ContinueLoop.java

Write a Java program called ContinueLoop.java that uses a for loop with the variable "count" and count 1 to 10.. Display "count=" each time you loop through. Skip the display statement using the continue statement if count = 5. At the end of the program display "Used continue to skip printing 5". Output: count = 1 count = 2 count = 3 count = 4 count = 6 count = 7 count = 8 count = 9 count = 10 Used continue statement to skip printing 5


【文件预览】:
实验3.4
----.project(385B)
----bin()
--------ContinueLoop.class(469B)
--------ForLoop.class(817B)
----.settings()
--------org.eclipse.jdt.core.prefs(629B)
----src()
--------ForLoop.java(296B)
--------ContinueLoop.java(202B)
----.classpath(301B)

网友评论