diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /659/CH4/EX4.10 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '659/CH4/EX4.10')
-rwxr-xr-x | 659/CH4/EX4.10/exm4_10.sce | 16 | ||||
-rwxr-xr-x | 659/CH4/EX4.10/exm4_10_output.PNG | bin | 0 -> 9854 bytes |
2 files changed, 16 insertions, 0 deletions
diff --git a/659/CH4/EX4.10/exm4_10.sce b/659/CH4/EX4.10/exm4_10.sce new file mode 100755 index 000000000..c6fdebbcb --- /dev/null +++ b/659/CH4/EX4.10/exm4_10.sce @@ -0,0 +1,16 @@ +// Example 4.10
+// The program illustrates all the options of printing a real number.
+
+y=98.7654; //real number
+//Various options of printing a real number
+printf('%7.4f\n',y);
+printf('%f\n',y);
+printf('%7.2f\n',y);
+printf('%-7.2f\n',y);
+printf('%07.2f\n',y);
+printf('%7.2f\n',y);
+printf('\n');
+printf('%10.2e\n',y);
+printf('%12.4e\n',-y);
+printf('%-10.2e\n',y);
+printf('%e\n',y);
\ No newline at end of file diff --git a/659/CH4/EX4.10/exm4_10_output.PNG b/659/CH4/EX4.10/exm4_10_output.PNG Binary files differnew file mode 100755 index 000000000..33f540bad --- /dev/null +++ b/659/CH4/EX4.10/exm4_10_output.PNG |