Write a java program to declare five variables of the following types: int, float,long, double and char. Initialise them. Calculate the average of those values and display the output along with an appropriate message
Answers
Answered by
0
Answer:
Class Avg
{
public static void main (String []args)
{
int a=10;
double b=20;
float c=30f;
long d=32L;
char e=(int)'a';
double avg=a+b+c+d+e/5;
System.out.println(avg);
}
}
Similar questions