write a program to find average of five numbers using non-static method
Answers
Answered by
0
Answer:
impot java.util.Scanner;
class average
{
static void main()
{
Scanner s= new Scanner(System.in);
int a,b,c,d,e,f;
System.out.println("Enter the numbers");
a=s.nextInt();
b=s.nextInt();
c=s.nextInt();
d=s.nextInt();
e=s.nextInt();
System.out.println((a+b+c+d+e)/5);
}
}
Similar questions
Math,
3 hours ago
India Languages,
3 hours ago
Accountancy,
5 hours ago
Physics,
5 hours ago
English,
8 months ago
Math,
8 months ago