1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
Program CalculAngle(input,output);
Uses Math,Crt;
Type TComplexe = record
RealPart : real;
ImgPart : real;
End;
Var z: Tcomplexe;
Fonction Module (var InputZ: Tcomplexe) : real;
Begin
Module := sqrt(sqr(InputZ.ImgPart)+sqr(InputZ.RealPart));
End;
Procedure Angle (InputZ: Tcomplexe;var OutputAngle: real );
Begin
OutputAngle := asin(InputZ.ImgPart / Module(InputZ));
End;
Var theta : real;
Begin
Textbackground(1);
clrscr;
Textcolor(10);
Writeln("Entrer un complexe :");
Textcolor(14);
Gotoxy(10,3);Readln(z.RealPart,z.ImgPart);
Angle(z,theta);
Textcolor(11);
Gotoxy(10,5);Writeln(#205,"Votre Resultat :",#205);
Textcolor(14);
Gotoxy(10,7);Writeln("THETA = ", theta:0:3);
Readln;
End. |
Partager