Free2Code
 
Time: 2008-11-21, 09:36pm
Need help in Getting Data in For Loop
Subject: Need help in Getting Data in For Loop  ·  Posted: 2007-01-08, 05:04am
Rank: ? (2)
Member #: 29466
Hi.

I'm writing a program to show the calender of a month, which the date is enter by the user.

I have to ask the user to the 2 dates, and show them 2 calender, by using for-loop.

Then, i have to do a comparison between these 2 dates, to see whether which one is earlier.

May i noe how to get the data (day,month,year) from a for loop?

Waiting for the reply..

 
  Reply to this ·  Post link ·  Top
Subject: Re: Need help in Getting Data in For Loop  ·  Posted: 2007-01-08, 01:36pm
Rank: ? (767)
Member #: 11085
Getting data from within a for loop is the same as retrieving data outside of a for loop.

- relpats_eht
 
  Reply to this ·  Post link ·  Top
Subject: Re: Need help in Getting Data in For Loop  ·  Posted: 2007-01-09, 03:49am
Rank: ? (2)
Member #: 29466
means?
I not very understand about ur statement...
can u give me an exmaple?
thx.. ^^

 
  Reply to this ·  Post link ·  Top
Subject: Re: Need help in Getting Data in For Loop  ·  Posted: 2007-01-09, 08:57am
Rank: ? (767)
Member #: 11085
What I mean is that all you have to do is write the code to get the date and then put for(int i=0; i<2; i++){ above it and } below it. Of course, you may want to use an array to do it, lest you overwrite what was entered the first time.

- relpats_eht
 
  Reply to this ·  Post link ·  Top

Pages: 1

Please login or register to post a reply.

icons