CSC 271 - Software I: Utilities and Internals
Assignment #16 - A Few Choice Statements Manipulating Strings
Due Friday, December 8, 2017
Write a program that uses a string s using the following statement:
s = " Fourscore and seven years ago ";
Write statements that will:
- Find and display the length of s
- Create a string
t
with the SAME EXACT string without the trailing andr
leading blank spaces and display the changed string.
- Create and display a string that add "our forefathers brought forth" to
string
s
- Create and display a string containing every character in s AFTER the
eighth character.
- Return the starting position of the word
"
seven
" and display it.
- Display the 18th character of the string
s
.
[Back to the Assignments
List]