From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 2409/CH2/EX2.10/Ex2_10.sce | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 2409/CH2/EX2.10/Ex2_10.sce (limited to '2409/CH2/EX2.10/Ex2_10.sce') diff --git a/2409/CH2/EX2.10/Ex2_10.sce b/2409/CH2/EX2.10/Ex2_10.sce new file mode 100755 index 000000000..a2c9861dc --- /dev/null +++ b/2409/CH2/EX2.10/Ex2_10.sce @@ -0,0 +1,32 @@ + + +//Variable Declaration + +y=2000 //year +mon=12 //month +dy=18 //day +hours=13 //hours of the day +minutes=0 //Minutes of the day +seconds=0 //Seconds of the day + + +//Calculation +d=dy+(hours/24)+(minutes/(24*60))+seconds //Days in December +if mon<=2 then + y=y-1 + mon=mon+12 +else + y=y + mon=mon +end + +A=floor(y/100) //Converting years to days +B=2-A+floor(A/4) //Converting years to days +C=floor(365.25*y) //rounding the days +D=floor(30.6001*(mon+1)) //Converting months to days +JD=B+C+D+d+1720994.5 //Adding reeference to number of days + + +//Result + +printf("The Julian day of given day is : %.4f Days",JD) -- cgit