Advertisement
Guest User

Untitled

a guest
Dec 15th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.10 KB | None | 0 0
  1. public class Aufgabe2 {
  2.     boolean t1f1, t1f2, t1w1, t1w2, t1e1, t2f1, t2f2, t2w1, t2w2, t2e1, c1t1, c2t1, c1t2, c2t2;
  3.     public static void main(String[] args){
  4.         Aufgabe2 aufgabe2 = new Aufgabe2();
  5.         aufgabe2.test();
  6.  
  7.     }
  8.  
  9.     void test(){
  10.  
  11.         boolean s1t1 = true, s2t1 = true, s3t1 = true, s1t2 = false, s2t2 = false;
  12.  
  13.  
  14.         if(s1t1 ^ s2t1)
  15.             t1f1 = true;
  16.  
  17.  
  18.         if(s1t1 && s2t1)
  19.             t1w2 = true;
  20.  
  21.         if(t1f1 ^ s3t1)
  22.             t1f2 = true;
  23.  
  24.         c1t1 = t1f2;
  25.  
  26.         if(t1f1 && s3t1)
  27.             t1w1 = true;
  28.  
  29.         if(t1w2 || t1w1)
  30.             t1e1 = true;
  31.  
  32.         c2t1=t1e1;
  33.  
  34.         if(s1t2 ^ s2t2)
  35.             t2f1 = true;
  36.  
  37.         if(c2t1 ^ t2f1)
  38.             t2f2 = true;
  39.  
  40.         if(s1t2 && s2t2)
  41.             t2w2 = true;
  42.  
  43.         if(t2f1 && c2t1)
  44.             t2w1 = true;
  45.  
  46.         if(t2w2 || t2w1)
  47.             t2e1 = true;
  48.  
  49.         c1t2 = t2f2;
  50.  
  51.         c2t2 = t2e1;
  52.  
  53.         System.out.println("C1T1: " + c1t1 +"\n"+
  54.                 "C1T2:" + c1t2 +"\n"+
  55.                 "C2T2:" + c2t2);
  56.  
  57.     }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement