summaryrefslogtreecommitdiff
path: root/1088/CH1/EX1.3
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /1088/CH1/EX1.3
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '1088/CH1/EX1.3')
-rwxr-xr-x1088/CH1/EX1.3/Example3.sce21
-rwxr-xr-x1088/CH1/EX1.3/Result3.pdf102
-rwxr-xr-x1088/CH1/EX1.3/Result3.txt102
3 files changed, 225 insertions, 0 deletions
diff --git a/1088/CH1/EX1.3/Example3.sce b/1088/CH1/EX1.3/Example3.sce
new file mode 100755
index 000000000..82f6d2e2d
--- /dev/null
+++ b/1088/CH1/EX1.3/Example3.sce
@@ -0,0 +1,21 @@
+clear()
+//clc()
+printf("Example 3 : Display the calendar of the current month and of a date \nentered by the user ")
+printf("\n**********************************************************\n")
+printf("Answer :\n\n\n")
+printf("The current date is %s whose calendar is ",date())
+ct=calendar()
+clc(19)
+disp(ct(1))
+disp(ct(2))
+disp(ct(3))
+printf("\n--------------------------------------------------------------------------------------\n")
+printf("Enter a date whose calendar is to be displayed \n")
+x=input('Enter in the format [dd,mm,yyyy],ALONG WITH THE PARENTHESIS ')
+ct=calendar(x(3),x(2))
+clc(21)
+disp(ct(1))
+disp(ct(2))
+disp(ct(3))
+printf("\n\nEntered Date is %d - %d - %d \n",x(1),x(2),x(3))
+printf("\n***********************************************************")
diff --git a/1088/CH1/EX1.3/Result3.pdf b/1088/CH1/EX1.3/Result3.pdf
new file mode 100755
index 000000000..8589e7214
--- /dev/null
+++ b/1088/CH1/EX1.3/Result3.pdf
@@ -0,0 +1,102 @@
+ ans =
+
+ 1.
+
+-->exec('Example3.sci',0)
+Current date is 29-May-2013
+
+Welcome to the Textbook Companionship Project 2013
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+ Book Title : UNIX CONCEPTS AND APPLICATIONS
+
+ Book Edition : 4
+
+ Book Author : Sumitabha Das
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+ Code Author : Pranav Bhat T
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+ Chapter Number : 1
+
+ Chapter Title : GETTING STARTED
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+Example 3 : Display the calendar of the current month and of a date
+entered by the user
+**********************************************************
+Answer :
+
+
+The current date is 29-May-2013 whose calendar is ct =
+
+
+ ct(1)
+
+ May 2013
+
+ ct(2)
+
+ M Tu W Th F Sat Sun
+
+ ct(3)
+
+ 0. 0. 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. 28. 29. 30. 31. 0. 0.
+ 0. 0. 0. 0. 0. 0. 0.
+
+ May 2013
+
+ M Tu W Th F Sat Sun
+
+ 0. 0. 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. 28. 29. 30. 31. 0. 0.
+ 0. 0. 0. 0. 0. 0. 0.
+
+--------------------------------------------------------------------------------------
+Enter a date whose calendar is to be displayed
+ x =
+
+ 29. 9. 1952.
+ ct =
+
+
+ ct(1)
+
+ Sep 1952
+
+ ct(2)
+
+ M Tu W Th F Sat Sun
+
+ ct(3)
+
+ 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. 28.
+ 29. 30. 0. 0. 0. 0. 0.
+ 0. 0. 0. 0. 0. 0. 0.
+
+ Sep 1952
+
+ M Tu W Th F Sat Sun
+
+ 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. 28.
+ 29. 30. 0. 0. 0. 0. 0.
+ 0. 0. 0. 0. 0. 0. 0.
+
+
+Entered Date is 29 - 9 - 1952
+
+***********************************************************
+-->diary('Result3.txt','close')
diff --git a/1088/CH1/EX1.3/Result3.txt b/1088/CH1/EX1.3/Result3.txt
new file mode 100755
index 000000000..8589e7214
--- /dev/null
+++ b/1088/CH1/EX1.3/Result3.txt
@@ -0,0 +1,102 @@
+ ans =
+
+ 1.
+
+-->exec('Example3.sci',0)
+Current date is 29-May-2013
+
+Welcome to the Textbook Companionship Project 2013
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+ Book Title : UNIX CONCEPTS AND APPLICATIONS
+
+ Book Edition : 4
+
+ Book Author : Sumitabha Das
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+ Code Author : Pranav Bhat T
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+ Chapter Number : 1
+
+ Chapter Title : GETTING STARTED
++-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+Example 3 : Display the calendar of the current month and of a date
+entered by the user
+**********************************************************
+Answer :
+
+
+The current date is 29-May-2013 whose calendar is ct =
+
+
+ ct(1)
+
+ May 2013
+
+ ct(2)
+
+ M Tu W Th F Sat Sun
+
+ ct(3)
+
+ 0. 0. 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. 28. 29. 30. 31. 0. 0.
+ 0. 0. 0. 0. 0. 0. 0.
+
+ May 2013
+
+ M Tu W Th F Sat Sun
+
+ 0. 0. 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. 28. 29. 30. 31. 0. 0.
+ 0. 0. 0. 0. 0. 0. 0.
+
+--------------------------------------------------------------------------------------
+Enter a date whose calendar is to be displayed
+ x =
+
+ 29. 9. 1952.
+ ct =
+
+
+ ct(1)
+
+ Sep 1952
+
+ ct(2)
+
+ M Tu W Th F Sat Sun
+
+ ct(3)
+
+ 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. 28.
+ 29. 30. 0. 0. 0. 0. 0.
+ 0. 0. 0. 0. 0. 0. 0.
+
+ Sep 1952
+
+ M Tu W Th F Sat Sun
+
+ 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. 28.
+ 29. 30. 0. 0. 0. 0. 0.
+ 0. 0. 0. 0. 0. 0. 0.
+
+
+Entered Date is 29 - 9 - 1952
+
+***********************************************************
+-->diary('Result3.txt','close')