diff options
Diffstat (limited to '1088/CH1/EX1.1/Example1.sce')
-rwxr-xr-x | 1088/CH1/EX1.1/Example1.sce | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/1088/CH1/EX1.1/Example1.sce b/1088/CH1/EX1.1/Example1.sce new file mode 100755 index 000000000..861d5a0b6 --- /dev/null +++ b/1088/CH1/EX1.1/Example1.sce @@ -0,0 +1,27 @@ +clear() +dt=getdate() +//clc() +disp("Example 1 : Write a code sequence to display the current date and time") +printf("\n**********************************************************\n") +disp("Answer : ") +printf("\n") +printf("The current date is %s and the current time is %d : %d : %d \nThe day is ",date(),dt(7),dt(8),dt(9)) +select dt(5) + case 1 then + printf("Sunday") + case 2 then + printf("Monday") + case 3 then + printf("Tuesday") + case 4 then + printf("Wednesday") + case 5 then + printf("Thursday") + case 6 then + printf("Friday") + case 7 then + printf("Saturday") +end +printf(".") +printf("\n**********************************************************\n") + |