Ferix

RSOJava#11

Dec 2nd, 2020
370
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class MyClass {
  2.     public static void main(String args[]) {
  3.         int numbers[] = {10,20,30,40,50,60,70,80};
  4.         int x = 0;
  5.         int y = 0;
  6.        
  7.         for (int i : numbers){
  8.             y = x;
  9.             x = x + i;
  10.             if(x<=100){
  11.                 System.out.println(y + " + " + i + " equals " + x);
  12.             }
  13.         }
  14.     }
  15. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×