TWO SMALL PROBLEMS

#1.

Palindrome emordnilaP

** **

**Objective: **Write a program that accepts a string and then determines whether or not it is a palindrome.

- A palindrome is the a word or phrase that can be spelled both forwards and backwards
- Radar
- Racecar
- Warts n straw
- Madam Im Adam
- Taco cat
- It ignores spaces
- Letter are treated the same whether they are upper or lower cased.

** **

**Example Dialog:**

** **

**Enter a word or phrase and I’ll tell you if it’s a palindrome.**

**Taco cat**

**Taco cat is a palindrome!**

**Done!**

** **

** **

** **

#2.

Odd Problem

it’s not matrix multiplication

**Objective:**

Write a program that creates a random two dimensional array of integers of size specified by the user. Count the number of odd values in the array then determine the percentage of odd numbers compared to the entire array. If most of them are odd say it’s an odd matrix otherwise it is not odd.

- First prompt the user to enter the matrix size
- Populate the matrix with random numbers from 0-9
- Go through and count the number of odd numbers in the matrix
- We will assume 0 is even
- Calculate the ratio of odd numbers to the entire matrix, and if it is above 50% then it is an odd matrix. Otherwise it is not an odd matrix

- Print the matrix and whether or not it is odd or not

**Example Dialog:**

** **

**Let’s determine if a random matrix is odd or not**

**Enter in the length of that matrix**

**4**

**Enter in the width of the matrix**

**3**

**The matrix**

**3 1 4**

**5 4 3**

**7 2 0**

**9 9 4**

**Is mostly odd**

** **

**Done!**

** **

** **

Subject | Computer |

Due By (Pacific Time) | 10/01/2014 11:30 pm |

Tutor | Rating |
---|---|

pallavi Chat Now! |
out of 1971 reviews More.. |

amosmm Chat Now! |
out of 766 reviews More.. |

PhyzKyd Chat Now! |
out of 1164 reviews More.. |

rajdeep77 Chat Now! |
out of 721 reviews More.. |

sctys Chat Now! |
out of 1600 reviews More.. |

sharadgreen Chat Now! |
out of 770 reviews More.. |

topnotcher Chat Now! |
out of 766 reviews More.. |

XXXIAO Chat Now! |
out of 680 reviews More.. |