This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: returns the character itself. For example, toLowerCase('B') returns b and toLowerCase('5') returns 5 . See Exercise 2.7 on how to convert an uppercase letter to lowercase. Write a test program that prompts the user to enter a character, invokes the function, and displays its return value. <Output> Enter a char: A a <End Output> <Output> Enter a char: 3 3 <End Output> 2. Write a function to compute the following series: 1 ... 3 2 2 1 ) ( + + + + = i i i m Write a test program that displays the following table: i m(i) 1 0.5 2 1.1667 ... 19 16.4023 20 17.3546...
View Full Document
- Spring '11