/home/caleb/NetBeansProjects/ADSV Java/lab5_CalebFontenot/src/main/java/com/calebfontenot/lab5_calebfontenot/Operators.java |
nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt
nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java
package com.calebfontenot.lab5_calebfontenot;
@author
public class Operators {
public static void main(String[] args)
{
int x = 8; int y = 15; double d = 2;
x += 2;
y += 5;
d++;
double z1 = ((double) x /(double) y ) * d++;
System.out.println("z1: " + z1 );
double z2 = ((double) x /(double) y ) * ++d;
System.out.println("z2: " + z2 );
double z3 = ((double) x /(double) y * (d - 1));
System.out.println("z3: "+ z3 );
System.out.println("x=" + x + " y=" + y + " d=" + d +
" z1="+ z1 + " z2=" +z2 + " z3=" +z3);
}
}