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

ArithDemo

/**
 *Demonstrates arithmitic
 * 
 * @author Nick Brown
 * 
 */



public class ArithDemo {

	public static void main (String [] args) {
	   
        int x = 5;
        int y = 2;
        int z1 = x + y;
        int z2 = x * y;
        int z3 = x + y;
        int z4 = x - y;
        int z5 = x % y;
        
        System.out.println(z1);
        System.out.println(z2);
        System.out.println(z3);
        System.out.println(z4);
        System.out.println(z5);
        
        System.out.println(z4 * 45);
        
        
        
        
        
       System.out.println("1");
       System.out.println("3");
       System.out.println("3");
       System.out.println("7");
       System.out.println("1337");
	}

}

Advertisements
Loading...

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