Advertisement
Guest User

Aufgabe4

a guest
Oct 25th, 2014
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.37 KB | None | 0 0
  1. public class Aufgabe4 {
  2.     public static void main(String[] args) {
  3.        
  4.         int wert = 0x1f;
  5.         int pruef;
  6.         int summe = 0;
  7.        
  8.         pruef = wert & 0x1;
  9.         wert = wert >> 1;
  10.        
  11.         summe = summe + wert & 0x1;
  12.         wert = wert >> 1;
  13.         summe = summe + wert & 0x1;
  14.         wert = wert >> 1;
  15.         summe = summe + wert & 0x1;
  16.         wert = wert >> 1;
  17.        
  18.        
  19.         System.out.println(summe);
  20.     }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement