Reply

Join Date: Mar 2005
Posts: 3
Reputation: coolgal_neha is an unknown quantity at this point 
Solved Threads: 0
coolgal_neha coolgal_neha is offline Offline
Newbie Poster

plz help

 
0
  #1
Jun 25th, 2005
well hi
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
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 70
Reputation: w00dy is an unknown quantity at this point 
Solved Threads: 2
w00dy w00dy is offline Offline
Junior Poster in Training

Re: plz help

 
0
  #2
Jun 25th, 2005
What have you tried so far?
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 1
Reputation: dhz920 is an unknown quantity at this point 
Solved Threads: 0
dhz920 dhz920 is offline Offline
Newbie Poster

Re: plz help

 
0
  #3
Jun 27th, 2005
Originally Posted by coolgal_neha
well hi
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
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
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 70
Reputation: w00dy is an unknown quantity at this point 
Solved Threads: 2
w00dy w00dy is offline Offline
Junior Poster in Training

Re: plz help

 
1
  #4
Jun 27th, 2005
Like this?

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Dim Leap As Boolean
  2.  
  3. Sub FindLeapYear
  4. Dim Year As Long
  5.  
  6. If Year/400 = Int(Year/400) Then
  7. Leap = False
  8. Exit Sub
  9. End If
  10.  
  11. If Year/4 = Int(Year/4) Then
  12. Leap = True
  13. Else
  14. Leap = False
  15. End If
  16. 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
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 2,413
Reputation: Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough Comatose is a jewel in the rough 
Solved Threads: 211
Team Colleague
Comatose's Avatar
Comatose Comatose is offline Offline
Taboo Programmer

Re: plz help

 
0
  #5
Jun 28th, 2005
Yes, Please Post your code so that we can take a look at it.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC