logo codesdope

create a method mAvg() that will take three number as arguments and return their average

   Abhayverma2535


Answers

  •    Deekshitha Ramavath

    import java.util.Scanner;

    class Average {

    public static void main (String[] args) {

    Scanner sc = new Scanner (System.in);

    System.out.println(“Enter the number”);

    int a= sc.nextInt();

    int b= sc.nextInt();

    int c= sc.nextInt();

    public int mAvg() {

    int avg = (a+b+c)/3;

    return avg;

    }

    }



Write your answer
Close

Welcome.please sign up.

Close

Welcome.please login.