日新月异
5
公司 :杭州神话信息技术有限公司
部门 :运营中心设计部
岗位 :UI视觉设计
8
关注
15
粉丝
7030
微博
56
被赞
新浪微博
原创达人
友情链接:
找感兴趣的人
精彩内容
热门应用
关于我们
手机玩微博
import java.awt.*;
import java.applet.*;
/*
<applet code=Di9Ti width=200 height=100>
</applet>
*/
public class Di9Ti extends Applet
{
public void paint(Graphics g)
{
int x,y,r1=5,r2=4;
int count=0;
for(x=1;x<y;x++)
{
for(y=1;y<r1;y)
{
if(x*x+y*y<=r2*r2||x*x+y*y>=r1*r1)
break;
g.drawStdng("x="+x+"y="+y,20+count*80,20);
count++;
}
}
g.drawString("count="+count,20,40);
}
}
ex11_3.html:
<html>
<head>
<title>A Simple Program</title>
</head>
<body>
<applet code="Di9Ti.class"width=800 height=400>
</applet>
</body>
</html>
正确答案:xr1; y++ continue;xr1; y++ continue;