Skip to content

Instantly share code, notes, and snippets.

@RaynZayd
Created July 26, 2017 21:34
Show Gist options
  • Save RaynZayd/1166e7a9c22081176ab7e0e57ab05d3c to your computer and use it in GitHub Desktop.
Save RaynZayd/1166e7a9c22081176ab7e0e57ab05d3c to your computer and use it in GitHub Desktop.
/*This program demonstrates the use of arithmetic operators. It carries out basic mathematical calculations. By Rayn Zayd */
/*This program demonstrates the use of arithmetic operators. It carries out basic mathematical calculations.
By Rayn Zayd
*/
public class ArithTest{
public static void main(String[] args){
int x = 10;
int y = 5;
int z = y;
System.out.println(x + y);
System.out.println(x - y);
System.out.println(x * y);
System.out.println(x / y);
System.out.println(x % y);
System.out.println(z += 1);
System.out.println(z -= 1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment