Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

MathDemo

/**
 * Demonstrates the "Big Five" of math
 * 
 * @author Fenton Krupp
 */

public class MathDemo {

    public static void main(String []args){
        int x = 13;
        int y = 5;
        
        //to slam some simple math
        int z1 = x + y;
        int z2 = x - y;
        int z3 = x * y;
        int z4 = x / y;
        int z5 = x % y;
        
        /*
         *
         * WHAT A mAdmAN sT0p tH3 pre5ses 
         * It spans many lines.
         * These stars make it look pretty.
         *
         */
         
        System.out.println("z1 is " + z1 + ".");
        System.out.println("z2 is " + z2 + ".");
        System.out.println("z3 is " + z3 + ".");
        System.out.println("z4 is " + z4 + ".");
        System.out.println("z5 is " + z5 + ".");
        
        System.out.println(x * 7 + y);
        }
}

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.