面向对象技术(本)阶段练习三.docVIP

  • 52
  • 0
  • 约4.96千字
  • 约 6页
  • 2017-02-24 发布于湖北
  • 举报
《面向对象技术(本)》课程第三阶段练习题 一.填充题 1.下面的程序经运行后,其输出结果是 y=1 x=0 。 public class Yuedu1{ public static void main(String args[]){ int x,y; x=y=0; do{ y++; x*=x; } while((x0)(y5)); System.out.println(y=+y+ x=+x); } } 2.下面的程序经运行后,其输出结果是 * # * # * 。 public class Yuedu2{ public static void main(String args[]){ int i; for (i=1;i6;i++){ if (i%2) { System.out.print(#); continue; } System.out.print(*); } System.out.println(); } } 3.下面的程序经运行后,其输出结果是 x1=10 x2=6

文档评论(0)

1亿VIP精品文档

相关文档