001-006-003
Variable Calculation: Sum and Average Display
Easy
Problem Description
In this problem, you will create a program that assigns values to variables, performs arithmetic operations, and displays the result to standard output.
Calculation and Output
You can calculate using variables and output the results.
Test Cases
※ Output examples follow programming industry standards
Input:
10 20 30
Expected Output:
Sum: 60 Average: 20
Input:
5 5 5
Expected Output:
Sum: 15 Average: 5
Input:
0 0 0
Expected Output:
Sum: 0 Average: 0
Input:
0 0 0
Expected Output:
Sum: 0 Average: 0
❌ Some tests failed
Your Solution
Current Mode:● My Code
99
1
2
3
4
5
6
7
8
9
10
›
⌄
⌄
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// Write your code here
sc.close();
}
}
0 B / 5 MB
You have 2 free executions remaining
