summaryrefslogtreecommitdiff
path: root/1088/CH1/EX1.1/Example1.sce
blob: 861d5a0b6a2401641a5eb9a2f3c410c8aa50e25b (plain)
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
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")