FANDOM



:real(value)

This takes a complex number, and determines what the real part of the number is. For a complex number in the form a+bi, this would return a.

imag( returns b, the part real( does not return. real(A)+imag(A)i=A would return true.

Location Edit

  1. (MATH)
  2. CPX
  3. 2:real(

Example Edit

PROGRAM:REAL
:ClrHome
:Input "Value: ",N
:real(N)→R
:If R0
:Then
:Output(2,1,"THE REAL PART IS")
:Output(3,1,R)
:Pause
:Stop
:End
:If R=0
:Then
:Output(2,1,"THE NUMBER HAS")
:Output(3,1,"NO REAL PART")
:Pause
:Stop
:End

This program will ask the user to input a value. If the number has a real part, it will print the real part. Otherwise, it will print that the number has no real part.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.