Assignemnt #17

Code

/// Name: Connor Siri
/// Period: 7
/// Program Name: Mathmatical
/// File Name: Mathmatical.java
/// Date Finished: 9/15/2015
class Mathmatical {

    public static void main(String[] args) {
        
      String one, two, both;
      int a, b, c, d, e, f, g;
      double x, y, z;
      
      a = 10;
      b = 27;
      System.out.println( "a is " + a + ", b is " + b);
      
      c = a + b;
      System.out.println("a+b is " + c);
      d = a - b;
      System.out.println("a-b is " + d);
      f = b / 2;
      System.out.println("b/2 is " +f );
      g = b % 10;
      System.out.println("b%10 is " + g);
      x = 1.1;
      System.out.println("\nx is " + x);
      y = x*x;
      System.out.println("x*x is " + y);
      z = b / 2;
      System.out.println("b/s is " + z);
      
      one = "dog";
      two = "house";
      both = one + two;
      System.out.println( both );
      
      
      
        
        
      }
}
    
    
    
    

Picture of the output

Assignment6