Assignemnt #28 - Variable Values

Code

        /// Name: Caelan Dorstad
        /// Period: 6
        /// Program Name: Variable Values
        /// File Name: VariableValues.java
        /// Date Finished: 10/23/2015
        
        public class VariableValues{
            public static void main(String[] args){
                int a, b, c;
                
                a = 5;
                b = 5;
                c = 5;
                
                System.out.println("a: " + a + "\tb:" + b + "\tc:" + c );
                a = a+2;
                b = b-3;
                c = c*3;
                System.out.println("a: " + a + "\tb:" + b + "\tc:" + c );
                
                a = 5;
                b = 5;
                c = 5;
                
                System.out.println("\na: " + a + "\tb:" + b + "\tc:" + c );
                a += 3;
                b -= 3;
                c *= 3;
                
                System.out.println("a: " + a + "\tb:" + b + "\tc:" + c );
                
                a = b = c =5;
                
                System.out.println("\na: " + a + "\tb:" + b + "\tc:" + c );;
                
                a=+1;
                b =- 2;
                System.out.println("a: " + a + "\tb:" + b + "\tc:" + c );
                
                a = b = c = 5;
                
                System.out.println("\na: " + a + "\tb:" + b + "\tc:" + c );
                a++;
                b--;
                System.out.println("a: " + a + "\tb:" + b + "\tc:" + c );
            }
        }
    

Picture of the output

Assignment 28