fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. class AddArray
  4. {
  5. public static void main (String [] args)
  6. {
  7.  
  8. //declare and create array temperature
  9.  
  10. int fractions[] = {6,9,5,4,5,7,12,15,21,32,1,45,22,12,19};
  11. for(int x = 0; x < fractions.length; x++)
  12. {
  13.  
  14.  
  15. if(fractions[x]> fractions[fractions.length - 1] )
  16. {
  17. System.out.println("Values greater than last value " +fractions[x] );
  18. }
  19.  
  20. } }
  21. }
Success #stdin #stdout 0.11s 320576KB
stdin
Standard input is empty
stdout
Values greater than last value 21
Values greater than last value 32
Values greater than last value 45
Values greater than last value 22