Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Java (https://www.askmehelpdesk.com/forumdisplay.php?f=440)
-   -   Imaginary numbers project java (https://www.askmehelpdesk.com/showthread.php?t=827668)

  • Sep 17, 2016, 03:47 PM
    mariazzzzz
    Imaginary numbers project java
    You remember the imaginary number, I, right? You should also recall that i1=i, i2= ­1, i3= ­i, i4=1,


    I


    5=i, i6= ­1, i7= ­i, i8=1, and so on. Notice i5=i


    .


    This is because 5%4 = 1 (Modulus operation of 4


    on the exponent 5 is 1). Similarly we see how the powers of I “cycle” around.


    In this program, write a program where you take an exponent of I of your choosing (not the one I


    use below in the example), perform a modulus operation on the exponent, and then outputs the


    equivalent expression per the chart above.


    For example, if I used i10, you would write a program that would output the following sentences:


    “I am examining i to the power of 10.”


    “The exponent “10” is 2 modulus 4.” (NOTE: Use the modulus operation on the exponent to get


    the result of 2. Also note the quotation marks around the 10.)


    THEN have your program print out the following sentences.


    “If the modulus operation of 4 on the exponent of I is 1, then the result is “i”.”


    “If the modulus operation of 4 on the exponent of I is 2, then the result is “­1”.”


    “If the modulus operation of 4 on the exponent of I is 3, then the result is “­i”.”


    “If the modulus operation of 4 on the exponent of I is 0, then the result is “1”.”


    write a program where you take an exponent of i8
  • Sep 17, 2016, 06:31 PM
    InfoJunkie4Life
    Not big on doing your homework in these forums, however, if you give it a go there are plenty of persons who are willing to help you along...

    Side note:

    Imaginary numbers



    knowing this...











    etc.

    Modulus would be good way to find the remainder, to process higher powers of i.

  • All times are GMT -7. The time now is 03:55 PM.