public class Average
{
public static void main(String[] args)
{
int mar=56;
int eng=67;
int math=56;
int subcnt=3;
Calculateavg( mar, eng, math,subcnt);
}
public static void Calculateavg(int mar, int eng, int math,int subcnt)
{
int add=mar+eng+math;
double avg=add/subcnt;
System.out.println(avg);
}
}
Output: 59.0
Post a Comment