MATHEMATICAL OPERATORS IN JAVA.
- public class operators{
- public static void main(String args[]){
- int x = 44;
- int y = 89;
- System.out.println(x+y);
- System.out.println(x*y);
- System.out.println(y/x);//division
- System.out.println(y%x);//reminder
- }}
RESULT IN COMMAND PROMPT:
No comments:
Post a Comment