vendredi 11 juin 2021

IF statements program

I'm having and issue, I have to write a program for my calculator but I'm not sure how to do it. It uses a form of QBASIC language.

My statemant is
IF ( y>0 and x> 0) then it should calculate n:=ATAN(y/x);
IF ( y<0 and x<0)) then it should calculate n:=ATAN(y/x)+ 180;
IF ( y>0 and x<0) then it should calculate n:=ATAN(y/x)+180;
IF (y<0 and x>0) then it should calculate n:= ATAN(y/x)+360;

I think I could only use ( IF, ELSE, THAN)

Aucun commentaire:

Enregistrer un commentaire