View Code of Problem 47

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a, b, c;
        a = sc.nextInt();
        b = sc.nextInt();
        c = sc.nextInt();

        int sum = a + b + c;
        int product = a * b * c;
        String average = String.format("%.2f", product / 3.0);
        System.out.println(sum + " " + product + " " + average);
    }
}

Double click to view unformatted code.


Back to problem 47