SHARE
TWEET

Untitled

a guest Dec 14th, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.ArrayList;
  2.  
  3. public class MyClass {
  4.     public static void main(String args[]) {
  5.         int[] binary = {0,0,0,1};
  6.         int temp = 1;
  7.        
  8.         for(int i = binary.length - 1; i >= 0 && temp != 0; i--) {
  9.             int bin = temp - binary[i];
  10.             temp = binary[i];
  11.             binary[i] = bin;
  12.         }
  13.     }
  14. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top