[A89] Re: [OT] C++ help


[Prev][Next][Index][Thread]

[A89] Re: [OT] C++ help




Here's an example:
yada......
main()
cin<<digit1;
cin<<digit2;
cin<<digit3;//etc.
//
//
if(digit1==digit6 && digit2==digit5 && digit3==digit4)
{
cout>>"That's a palindrome";
}
return;
}
hope this works...
----- Original Message -----
From: "Matt" <kinchu89@hotmail.com>
To: <assembly-89@lists.ticalc.org>
Sent: Thursday, January 31, 2002 4:06 PM
Subject: [A89] Re: [OT] C++ help


>
> I am not advanced in C++, so this might sound stupid, but maybe have them
> enter each of the 6 digits seperately(i.e. enter the first, enter, enter
the
> second, etc.) and then see if the first and sixth are equal, second and
> fifth, etc, etc. If that doesn't work, sorry, like I said, I am not very
> good in C.
> --Matt
> ----- Original Message -----
> From: "Ashley Harrison" <skinnej16@juno.com>
> To: <assembly-89@lists.ticalc.org>
> Sent: Thursday, January 31, 2002 3:37 PM
> Subject: [A89] [OT] C++ help
>
>
> >
> >
> > I need some help w/ a program for c++, i need to take a six-digit number
> > entered by the user that could be a possible palindrome(a six digit
> > number that reads the same front and back, i.e. 123321, 456654), the
> > program has to determine if the number is a palindrome or not, and all i
> > can use is if/else statements and the switch statement and logical
> > operators, any ideas?
> >
> > Chris
> > ________________________________________________________________
> > GET INTERNET ACCESS FROM JUNO!
> > Juno offers FREE or PREMIUM Internet access for less!
> > Join Juno today!  For your FREE software, visit:
> > http://dl.www.juno.com/get/web/.
> >
> >
>
>



References: