Wednesday, July 23, 2014

variables Arithmetic operations

as we said before variables are containers of values and data so we can use this data and store them and do some operations to them just like the arithmetic operations

  • Add:
the value of z is the sum of x and y
  • Subtract:


Note if z was integer this will be Error because it can store negative value so be Aware
  • Multiply:


  • Division:


Note : this wont be Error if z where Integer but it wont get only the Integer part what does that mean the output of 1/5 is 0.2 this means Z will be 0 only and if the output was 2.2 the value will be 2 only so be AWARE

No comments:

Post a Comment