Question: E XERCISE 3 : S IMPLE C ALCULATOR : In it s most basic form , R can be used as a simple calculator .
E XERCISE 3 : S IMPLE C ALCULATOR : In it s most basic form , R can be used as a simple calculator . Consider the following arithmetic operators : Addition : Subtraction : - Multiplication : * Division : / Exponentiation : ^ Modulo : % % The last two might need some explaining : The ^ operator raises the number to its left to the power of the number to its right : for example 3^ 2 equals 9 . The modulo returns the remainder of the division of the number to the left by the number on its right , for example 5 modulo 3 or 5 % % 3 equals 2 . Now , perform the following : a. Type 2 ^ 5 in the editor to calculate 2 to the power 5 . Type 28 % % 6 to calculate 28 modulo 6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
