• Exercise 4
     
    • Create program that asks user to give two(2) integers and calculation method for those values: addition or subtraction.
      Program shows then the result of calculation.
       
    •  Examples of inputs and results:

      >Give 2 numbers:
      >1
      >2
      >(A)ddition or (S)ubtraction?
      >3 (addition: 1+2)
      >1 (subtraction: 2-1)

    • Example program, that need class Lue to function properly
    • Hints:
      • Java Tutorial / Learning the Java Language / Language Basics
        especially Control Flow Statements / The if/else Statements
         
  • Back