diff options
Diffstat (limited to '659/CH8/EX8.4/exm8_4.sce')
-rwxr-xr-x | 659/CH8/EX8.4/exm8_4.sce | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/659/CH8/EX8.4/exm8_4.sce b/659/CH8/EX8.4/exm8_4.sce new file mode 100755 index 000000000..d9b2e9f72 --- /dev/null +++ b/659/CH8/EX8.4/exm8_4.sce @@ -0,0 +1,17 @@ +// Exampple 8.4
+//Write a program to store the string "United Kingdom" in the array country-
+//and display the string under various format specifications.
+
+
+country='United Kingdom';
+printf("\n");
+printf("*123456789012345*\n");
+printf("--------\n");
+printf("%15s\n",country);
+printf("%5s\n",country);
+printf("%15.6s\n",country);
+printf("%-15.6s\n",country);
+printf("%15.0s\n",country);
+printf("%.3s\n",country);
+printf("%s\n",country);
+printf("--------\n");
|