/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package firstjavaspr16; /** * * @author jcmtiernan */ public class FirstJavaSpr16 { /** * @param args the command line arguments */ public static void main(String[] args) { int alpha; int beta = 8; int sumAlphaBeta; double resultAB; alpha = 6; System.out.println(alpha); System.out.println(beta); sumAlphaBeta = alpha + beta; System.out.print("The sum of alpha "); System.out.print(alpha); System.out.print(" plus beta "); System.out.print(beta); System.out.print(" equals "); System.out.println(sumAlphaBeta); int productAB = alpha * beta; System.out.println("The product of alpha "+alpha+" and beta "+beta+" equals "+productAB); System.out.println(); resultAB = alpha / beta; System.out.println(resultAB); resultAB = alpha % beta; System.out.println(resultAB); resultAB = (double)alpha / beta; System.out.println(resultAB); } }