Computer Science, asked by MasterQuestioner, 1 year ago

Write a program using variables to find the average of 35, 43 and 97

Class 9 - Computer Applications - Ch 3

Answers

Answered by duragpalsingh
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 Anonymous
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