Saturday, 30 January 2016

MATHEMATICAL OPERATORS IN JAVA.


  1. public class operators{
  2. public static void main(String args[]){
  3. int x = 44;
  4. int y = 89;
  5. System.out.println(x+y);
  6. System.out.println(x*y);
  7. System.out.println(y/x);//division
  8. System.out.println(y%x);//reminder
  9. }}

RESULT IN COMMAND  PROMPT:

click for large view






No comments:

Post a Comment