Question: Write a Java program that create two variables of type integer and initially assign their values to 125, 24 and then print the result of

  1. Write a Java program that create two variables of type integer and initially assign their values to 125, 24 and then print the result of the following arithmetic operations in separate lines:
    1. Addition
    2. Subtraction
    3. Multiplication
    4. Division
    5. Reminder

Finally, ask the user to enter two numbers and then print the result of the above arithmetic operations of those numbers in separate lines too.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!