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

Recommended Answers

All 4 Replies

What have you tried so far?

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

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

commented: Nice Code ;) +1

Yes, Please Post your code so that we can take a look at it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.