class Average
{
int a=5,b=4,c=3;
float avg;
void calaverage()
{
avg=(a+b+c)/3;
}
void printavg()
{
System.out.println("Average of three varibales"+avg);
}
public static void main(String[] args)
{
Average a1=new Average();
a1.calaverage();
a1.printavg();
}
}
No comments:
Post a Comment