Declare a character array, and initialize it to a suitable string.
Use a loop to change every other character to uppercase.
Hint: In the ASCII character set, values for uppercase
characters are 32 less than their lowercase counterparts.
Change
Arabic number to Chinese number:
Given an amount of money (in the form of Arabic number), please change
it to the form of Chinese number. For example, if the input value is
5203, then you have to change it to ¡§¥î¥a¶L¨Õ¹s°Ñ¡¨.
Word Counter
Sometimes we need to know the number of words in an article. Write a program to count the number of
English words in a line. Note: English words are separated by spaces.
Two words may be separated by a space, or multiple spaces.
For example,
Input
Output
This is a book.
4
Yesterday was Thursday. It was a rainy day.
8
Palindrome:
A palindrome is a string of numbers or letters that is the same
forward as backward. For example, the string "ABCDEDCBA" is a palindrome
because it is the same when the string is read from left to right as
when the string is read from right to left.
Write a program which can take an input string from the user, and
determine whether it is a palindrome or not.