# Java-calculating the sum of last two numbers in a line of x numbers

The input is a x number of numbers separated by spaces. It has to take the last 2 numbers and calculate their sum. I can only use scanner, int, boolean, while loop, and if loop. Don't really know where to start, so help would be appreciated....

By: StackOverFlow - Sunday, 18 November

# Related Posts

- Older News
- Navigation drawer with different Tab Bar programmatically StackOverFlow (Today) - I want to make a design like the first photoalways using navigation drawer, but when i select another fragment from this menu (nav drawer) the tab bar will change for...
- counting loops in array [on hold] StackOverFlow (Yesterday) - I've got a, imo, quite complicated task to complete for my university. I am new to java so pls take this in reconsideration before you flame me ty :)So the...
- I don't know how to solve this "ArrayIndexOutOfBoundsException" error StackOverFlow (Yesterday) - ı created nested loop to implement integers in my String array : int ı = 0;String[] haha = new String[sizeFinder(numbers)];for (int q = 0; q < sizeFinder(numbers);) {for (ı =...
- Table number spinner StackOverFlow (Yesterday) - Im trying to implement a table with 3 rows and 6 columns, each column will consist of numbers up to 50 and it can be spinned around to pick a...
- I created decimal to binary method and I want to use it in 2D array but I can't StackOverFlow (Yesterday) - I created simple decimal to binary method like this :public static int[] convertDectoB(int number, int size) {int binary[] = new int[size];for (int a = number; a > 0 && size...
- Test if code contains three digits in order in Array. StackOverFlow (Yesterday) - Directions:Write a code that determines whether A, B, and C appear consecutively and in order exactly once in the numbers array and return the result. Example:Suppose A is 1, B...
- Bingo Board using unique random numbers (JAVA) StackOverFlow (2 days ago) - I am trying to output a bingo board with random numbers (without using arraylists or hashes) from 11-89, and my code sometimes works and sometimes it does not so I...
- Removing duplicates from an ArrayList? StackOverFlow (2 days ago) - Good afternoon everyone, I am currently studying for my Java Final and I have a review exercise that asks the reader to create a program that asks the user to...
- Error message saying that the array has been exceeded StackOverFlow (3 days ago) - I was wondering if you guys can give me pointers on how to fix my code. I am trying to put an out an error message that the size of...
- How should I store a extremely large Data Type StackOverFlow (3 days ago) - I am currently posed with an issue regarding a super large number input. The number may range from 0 - 10^50. I have done research regarding this, but I did...