Week 5

From CompSciWiki
Revision as of 00:09, 2 April 2010 by JaeManL (Talk | contribs)

Jump to: navigation, search

{{1010PrAD

|ProblemName=
Complete the program Palindrom below that checks if a word is palindrome.
If the word is palindrome, print out "It's a palindrome." using System.out.println().
Otherwise, print out reversed order of the word.
You will need to IGNORE the blanks in the string.
Two strings are provided and find out whether they are palindromes or not.

For example, "deed" and "civic" are palindromes.
"tomato" and "mama" are not palindromes.

public class asd 
{
	public static void main(String[] args)
	{
		String testWord1 = "Are we not drawn onward, we few, drawn onward to new era"
		String testWord2 = "Murder for a jar of red rum"
			
		// Your code goes here
	}
}

|Problem=The problem

|SolutionCode=public class HelloWorld
{
}

|SideSectionTitle=...by students

|SideSection=
[[Image:OperatingSystemExample.jpg|float|267px]]
<BR>
Taken from http://www.flickr.com/photos/daniello/565304023/

An image or By Students section

|Solution=The solution...

}}