diff options
Diffstat (limited to '608/CH23/EX23.05')
-rwxr-xr-x | 608/CH23/EX23.05/23_05.sce | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/608/CH23/EX23.05/23_05.sce b/608/CH23/EX23.05/23_05.sce new file mode 100755 index 000000000..d2a7ea51a --- /dev/null +++ b/608/CH23/EX23.05/23_05.sce @@ -0,0 +1,13 @@ +//Problem 23.05: Convert (5,-132°) into a + ib form correct to four significant figures.
+
+//initializing the variables:
+r = 5; // magnitude
+theta = -132; // in degree
+
+//calculation:
+x = r*sin(theta*%pi/180)
+y = r*cos(theta*%pi/180)
+z = x+%i*y
+
+printf("\n\n Result \n\n")
+printf("\n Z is %.3f + (%.3f)i", x,y)
\ No newline at end of file |