2013年6月18日

用for输出菱形。

摘要: import java.util.*;class temp{ public static void main(String []args) { System.out.println("请输入奇数:"); Scanner sc=new Scanner(System.in); int count=sc.nextInt(); int b=1; for (int i=1; i<=count; i++) { if (!(i%2==0)) { for (int j=count/2+1;j>b;j--) { System.out.print(" "); } 阅读全文

posted @ 2013-06-18 19:31 iyon 阅读(381) 评论(1) 推荐(0) 编辑

导航