Arithmetic

 package opertaors;


public class ArithmeticOperators {


public static void main(String[] args) {


int a = 10;

int b = 48;

int c = a * a + b * b + 2 * a * b;

int d = ( a + b ) + ( a + b );

double e = (double)a/(double)b;

int f =  b % a ;

int g = b++;

int h = a--;

System.out.println(c);

System.out.println(d);

System.out.println(e);

System.out.println(f);

System.out.println(g + " " + b + " " + h + " " + a);

}


}


Comments

Popular posts from this blog

Type Casting

Pattern 1