Have been fooling around a while and came up with this code:

Define dw14mk(lijnb,lijnc,hoekA)=

Prgm

:If lijnb≤0 or lijnc≤0 or hoekA≤0 Then

:Disp "De ingevoerde getallen moeten groter dan 0 zijn"

:Disp "Het programma stopt hier. Probeer opnieuw."

:Goto stopprogramma

:EndIf

:setMode(2,2)

:lijna=√((lijnb^(2)+lijnc^(2)-2*lijnb*lijnc*cos(hoekA)))

:hoekB=cos^((-1))((lijnb^(2)-lijna^(2)-lijnc^(2))/(-2*lijna*lijnc))

:hoekC=cos^((-1))((lijnc^(2)-lijnb^(2)-lijna^(2))/(-2*lijna*lijnb))

:Disp "De ingevoerde gegevens:"

:Disp "Lijn b = ",format(round(lijnb,1),"f2")

:Disp "Lijn c = ",format(round(lijnc,1),"f2")

:Disp "Ingesloten hoek A = ",format(round(hoekA,1),"f2"),"0"

:If lijnb=lijnc and hoekA≠60 Then

:Disp "De invoer geeft een gelijkbenige driehoek."

:EndIf

:If lijnb=lijnc and hoekA=60 Then

:Disp "De invoer geeft een gelijkzijdige driehoek."

:EndIf

:Disp "Lijn a = ",format(round(lijna,1),"f2")

:Disp "Hoek B = ",format(round(hoekB,1),"f2"),"° "

:Disp "Hoek C = ",format(round(hoekC,1),"f2"),"° "

:Lbl stopprogramma

:EndPrgm

The code will be used in a dutch high school if I can get it to work. And no I am not getting paid to do this. I am a math student trying to get his study points for ICT…..

The purpose of the code is to calculate two angles (B and C) with a given angle (A) and two sides (b and c).

I already renamed the angles alpha, beta and gamma. Still there remains a problem.

Overtime I do a syntax check it takes me to this line:

:hoekB=cos^((-1))((lijnb^(2)-lijna^(2)-lijnc^(2))/(-2*lijna*lijnc))

and tells me there is a missing bracket. But where? I used the reference guide and all, but I can't find the missing bracket, maybe that is because it is missing (attempt to be funny), but I really don't see where it should go.

Then of course when I try to run the code there is the message of too many arguments in function or command line.

Does anyone see what I don't see?

Thanks in advance for your help.

Marc