Download Print this page

Casio PB-2000C Manual page 57

Hide thumbs Also See for PB-2000C:

Advertisement

3-J
tutqiry
cha@æ
N
vducs
f,ntering nlucs
Nw
lel's try I progm
thât elculat6
thc sinc ild
æsire
of yalu6
tbat yoù dtcr
frcm
the krybffid.
Sincc wc €n
be qpecaing
deim&l
Blu6
for itrput and oulput.
E vill
bc
definiq
the wiable
as floatitrg poinr. The pogmm
to accompli$h this task wuld
app€r
æ follws:
Fint we mut
spæify the wiablc
x æ flotint
point-
Thc n{rt tlnc tclls the smpu.3r
to print th€ mcsg€
"Itrput
Valuc (DEG)"
s a pmmpr.
Thc snf(
) functiou
is uod
to gct the entry of a valw
fpm
the keyboad"
Esclly
the
opporitc
qf thc printf
functior!
tàc first lrguEent
of rtf(
) dctçmi[6
rhc typc, td
the qlue
is æsign€d to the sænd
argumcnt.
In the prcgru
h!r€, rc @
s
that the fGt
ûgumcnt
of ruf(
) is %f, to indi€tc
n@titrg
point. Tbc ffitd
ar8uflt
is Eo( wbich
is a porrra
which indicalcs a
add6s
in mcmory. Illc
rcond
ûgtrml
of thc mf(
)
fuoction
must bc a poiDlcr.
Tbc $rico6t
"arglc
(o);" specific
ôe mit of ugulr
m|renL
You ff
speify
the
uit
by chmging
rh€ vslæ follwiDg
"anglc"
s follos:
tnglc
(0) -
dcgrc
8ûglc (l) -
radiaru
anglc (2) -
Srads
Th€ nqr
stalcments âÊ thc nN-familitr
prinrf(
). Noe rhar thc l$ aryumol
@ntâins
M
%f (tloatirg
point) vâlu6 which corcspond
to the 2nd aryumst
(r) and the 3rd 8rgu-
mt
(sitr(x) or æs(xD.
/*
t inclu do
" s tdi o .h "
* /
/*
*inclu de
" m a lh . h "
+ l
0a i n ( )
t
I I o a I
x :
pr in t
f ("l np u t
V â lu ô ( D EG ) ")
;
scan t ( "0 ôt " ,
& x ) ;
an gle (0) ;
pr in tl( "sin(C { l ) .96 1 r n " ,
x,
s in ( r )
pr int f( "cos(
l ) = i6 fr n " ,
x,
c o s( r )
I

Advertisement

loading