|
From: nuc p. <nuc...@ms...> - 2004-06-21 22:50:55
|
thanx jesse for the explanation. the line makes complete sense now!!
peter
>From: Jesse Hallam <jes...@gm...>
>To: dirty dragon <dir...@ms...>
>CC: dev...@li...
>Subject: Re: [Dev-C++] (no subject)
>Date: Mon, 21 Jun 2004 15:58:40 -0400
>
>Provided number is an integer,
>
>number / 10000 == 1st digit (55255 / 10000 = 5)
>number % 10 == 5th digit (55255 % 10 = 5)
>
>if (number/10000) == (number%10)) checks if the first and last digits are
>equal.
>
>
>(number/1000)%10 == 2nd digit
>(number/10)%10) == 4th digit
>
>if (number/1000)%10 == (number/10)%10 checks if the second and fourth
>digits are equal.
>
>The third digit can be ignored...
>
>Cheerio!
>
>
>
>On Mon, 21 Jun 2004 15:45:12 -0400, dirty dragon <dir...@ms...>
>wrote:
> >
> > can someone please explain the significance of the second if statement?
> > thnx pete
> >
> > if((number>=10000 && number <100000))
> >
> > {
> > if (((number/10000) == (number%10)) && (((number/1000)%10) ==
>((number/10)
> > %10)))
> >
> > cout<<number<<" is a palindrome"<<endl;
> > else
> > cout <<number<<" is not palindrome"<<endl;
> >
> > }
> > else{
> > cout<<"You did not enter a 5-digit number!"<<endl;
> >
> > _________________________________________________________________
> > FREE pop-up blocking with the new MSN Toolbar get it now!
> > http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
> >
> > -------------------------------------------------------
> > This SF.Net email sponsored by Black Hat Briefings & Training.
> > Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
> > digital self defense, top technical experts, no vendor pitches,
> > unmatched networking opportunities. Visit www.blackhat.com
> > _______________________________________________
> > Dev-cpp-users mailing list
> > Dev...@li...
> > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
> > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
> >
>
>
>--
>Jesse Hallam
>University of Waterloo Freshman
>
>
>-------------------------------------------------------
>This SF.Net email sponsored by Black Hat Briefings & Training.
>Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
>digital self defense, top technical experts, no vendor pitches,
>unmatched networking opportunities. Visit www.blackhat.com
>_______________________________________________
>Dev-cpp-users mailing list
>Dev...@li...
>TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_________________________________________________________________
MSN 9 Dial-up Internet Access fights spam and pop-ups now 3 months FREE!
http://join.msn.click-url.com/go/onm00200361ave/direct/01/
|