Write a program for given three number to find a mean

Write a program for given three number to find a mean
class test
{
Public static void main(String args[])
{
int x=10,y=20,z=30;
double m=(x+y+z)/3;
System.out.println(“Mean is ”+m);
}
}

Output:
Mean is 20

Leave a Reply

Your email address will not be published. Required fields are marked *