This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class SingleDigitSum { | |
public static void main(String[] args) { | |
int numbersToInput = 3; // how many numbers to take | |
int[] numbers = new int[numbersToInput]; // numbers array | |
int sum = 0; // we store the sum here | |
// initialize scanner |