0

well hi :D
Actually i have a school assignment and i need help with it
i have 2 ques which i am not able to solve so plz help me
Q1)create a program to find wether the entered year id leap or not? :?:
Q2)write a program to find and print maximum and minimum from one dimensional arrays? :?:

help plz
thanks
neha :D

4
Contributors
4
Replies
5
Views
12 Years
Discussion Span
Last Post by Comatose
0

well hi :D
Actually i have a school assignment and i need help with it
i have 2 ques which i am not able to solve so plz help me
Q1)create a program to find wether the entered year id leap or not? :?:
Q2)write a program to find and print maximum and minimum from one dimensional arrays? :?:

help plz
thanks
neha :D

Just a hint to Q1. if not(int((year/400)=year/400)) then
if(int(year/4)=year/4) then
year = leap year
you'll have to work the exact syntax.
Every 400 years (as in the year 2000, leap year is skipped to get closer to the actual solar date. -dz-

dz

1

Like this?

Dim Leap As Boolean

Sub FindLeapYear
    Dim Year As Long

        If Year/400 = Int(Year/400) Then
		Leap = False
		Exit Sub
	End If
	
	If Year/4 = Int(Year/4) Then
		Leap = True
	Else
		Leap = False
	End If
End Sub

always avoid complicated statements with too many brackets if you can

Give me a little more info about what you want to do in Q2

Votes + Comments
Nice Code ;)
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.