摘要: import java.util.Scanner; public class ShopMoney { public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("☆☆☆☆购物金额☆☆☆☆☆"); Scanner n=new Scanner(System.... 阅读全文
posted @ 2016-07-28 17:29 奔跑丶小清新 阅读(165) 评论(0) 推荐(0)
摘要: int s=0; while(s<2){ System.out.println("j"); int d=0; while(d<3){ System.out.println("i"); d++; } s++; } //外层执行一次,里层执行一遍,即输出j i i i j i i i int i=0; do{ S... 阅读全文
posted @ 2016-07-28 13:41 奔跑丶小清新 阅读(220) 评论(0) 推荐(0)
摘要: while(循环条件1){ 循环操作 } //先判断,后操作 do{ 循环操作 }while(循环条件); //先操作,后判断 for(变量初始,[循环变量];条件判断;循环变量,[循环变量]){ //例如 for(int a,b;a<3;a++,b--) 循环操作 } 阅读全文
posted @ 2016-07-28 13:25 奔跑丶小清新 阅读(193) 评论(0) 推荐(0)
摘要: 在编写过程中,可能没有做到语句的精简,这个是需要解决的事。 package nzcc4; import java.util.Scanner; public class Shopmain { public static void main(String[] args) { // TODO Auto-generated method stub Scanner n=new Scanner(... 阅读全文
posted @ 2016-07-27 17:53 奔跑丶小清新 阅读(465) 评论(0) 推荐(0)