package com.myfirst;public class Helloworld { public static void main(String[] args){ Helloworld hello=new Helloworld(); double avg=hello.clacAvg; System.out.println("平均成绩为:"+avg); } public double clacAvg(){ double java=92.5; double php=83.0; double avg=(java+php)/2; return avg; }}
添加回答
举报
0/150
提交
取消