Write a program using variables to find the average of 35, 43 and 97
Class 9 - Computer Applications - Ch 3
Answers
Answered by
3
Hey there!
Program using variables to find the average of 35, 43 and 97 :
public class Question
{ static void main()
{
int a=35,b=43,c=97;
float avg;
avg=(float)(a+b+c)/3;
System.out.println("Average of the numbers="+avg);
} }
Hope It Helps You!
Answered by
0
class avg
{
public static void main()
{
int a = 35, b = 43, c = 97;
System.out.println("The average of the numbers is :-");
double avg = (a+b+c)/3;
}
}
Similar questions