题目
[填空题]下面是一个JavaApplet程序,请将程序补充完整使它的功能为计算数组各元素的平均值。
importjava.applet.Applet;
importjava.awt.*;
publicclassExamextendsApplet
publicvoidpaint(Graphicsg)
inta[]=1,3,5,7,9,10;
inttotal=0;
floatave;
for(inti=0;i<A.length;i++)
total+=a[i];
ave=total【13】;
g.drawstring("ave="+ave,30,60);
提示:未搜索到的试题可在搜索页快速提交,您可在会员中心"提交的题"快速查看答案。
答案
查看答案
搜题