Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Gary Daniels and Evan Goldring - Mock whiteboard problem
Aug 25, 2004 at 7:52 PMGary Daniels and Evan Goldring - Mock whiteboard problem
Aug 25, 2004 at 1:09 AMGary Daniels and Evan Goldring - Mock whiteboard problem
Aug 24, 2004 at 7:13 PMhere is my stab at the palindrome problem. its the complete code to the program and all =D and it even works with spaces
#include <iostream>
#include <algorithm>
#include <string>
using namespace std;
bool IsPalindrome(string strName)
{
string strReverse = strName;
if(strName == "")
{
return false;
}
reverse(strReverse.begin(), strReverse.end());
for(int i = 0; i < strName.size(); i++)
{
if( strName[i] == strReverse[i] )
{
continue;
}
else
{
return false;
}
}
}
int main()
{
string strPalindrome;
cout << "Enter a word: ";
getline(cin, strPalindrome);
if(IsPalindrome(strPalindrome.c_str()) == false )
{
cout << strPalindrome << " is not a palindrome" << endl;
}
else
{
cout << strPalindrome << " is a palindrome" << endl;
}
getchar();
getchar();
return 0;
}
“A Hitchhiker’s Guide to Microsoft” Eric Rudder picks up Lenn
Jul 06, 2004 at 12:38 AM“A Hitchhiker’s Guide to Microsoft” Eric Rudder picks up Lenn
Jul 06, 2004 at 12:33 AM