Declare year as Integer
Declare month as Integer
Declare day as Integer
Declare sum as Integer
Declare feb as Integer
Set sum=0
If (year%4==0 and year%100 !=0) or (year%400==0) Then
Feb = 29
Else
Feb = 28
End If
Select Case of month
case 1:
Write "Your date is the",day," days of the year"
case 2:
sum = sum+31+day
Write "Your date is the",sum," days of the year"
case 3:
sum = sum+31+Feb+day
Write "Your date is the",sum," days of the year"
case 4:
sum = sum+31+Feb+31+day
Write "Your date is the",sum," days of the year"
case 5:
sum = sum+31+Feb+31+30+day
Write "Your date is the",sum," days of the year"
case 6:
sum = sum+31+Feb+31+30+31+day
Write "Your date is the",sum," days of the year"
case 7:
sum = sum+31+Feb+31+30+31+30+day
Write "Your date is the",sum," days of the year"
case 8:
sum = sum+31+Feb+31+30+31+30+31+day
Write "Your date is the",sum," days of the year"
case 9:
sum = sum+31+Feb+31+30+31+30+31+31+day
Write "Your date is the",sum," days of the year"
case 10:
sum = sum+31+Feb+31+30+31+30+31+31+30+day
Write "Your date is the",sum," days of the year"
case 11:
sum = sum+31+Feb+31+30+31+30+31+31+30+31+day
Write "Your date is the",sum," days of the year"
case 12:
sum = sum+31+Feb+31+30+31+30+31+31+30+31+3+day
Write "Your date is the",sum," days of the year"