Witam
Mam drobny problem z tablicami, mam napisac program ktory posiada tablice z 15 cyframi, ale ma wyswietlac tylko te co sa wieksze od ostatniej liczby w tabeli.
class AddArray
{
public static void main (String [] args)
{
//declare and create array temperature
int fractions[] = {6,9,5,4,5,7,12,15,21,32,1,45,22,12,19};
//int counter = 0;
for(int x = 0; x < fractions.length; x++)
{
if(fractions[x]> fractions[fractions.length - 1] )
{
System.out.println("Values greater than last value " +fractions[x] );
}
//if(fractions[x]%3 == 0)
//{
//System.out.println("Multiple of three " +fractions[x] );
//}
//if(fractions[x]== 5)
//{
//counter++;
//
//}
//System.out.println("There are " +counter+ " occurence of five " );
} }
}