Code is copied!
Program to input marks in 3 subjects and print their average JAVA
Write a Program to input marks in 3 subjects and print their average.
import java.util.*; class average { public static void main(String args[]) { Scanner sc = new Scanner (System.in); int m1 = sc.nextInt(); int m2 = sc.nextInt(); int m3 = sc.nextInt(); int total = m1 + m2 + m3; double avg = total / 3; System.out.println("Average =" + avg); } }