for(int i = 0; i < transactions.length-1; i++)
{
if(transactions[i] == 0)
{
position = i;
break;
}
}
It appears that you're skipping the last index in the array.
Type: Posts; User: javapenguin
for(int i = 0; i < transactions.length-1; i++)
{
if(transactions[i] == 0)
{
position = i;
break;
}
}
It appears that you're skipping the last index in the array.
If sum is the amount of money they are putting in, shouldn't it be double?
What if someone puts in $200.95?
import java.util.Scanner;
public class BankoMat
{
public static void main(String[] args)
{
Scanner keyboard = new Scanner(System.in);