diff options
| author | mo <mo.khan@gmail.com> | 2019-05-26 20:55:36 -0600 |
|---|---|---|
| committer | mo <mo.khan@gmail.com> | 2019-05-26 20:55:36 -0600 |
| commit | 0aaf949568e1f3634e5c802b6640981155c1af9b (patch) | |
| tree | 3f00d15985b409928a12dce1f5275d62d46bdb30 /src/Q1/README.md | |
| parent | 856c35dbc7080922bfff7c10a7a844a9d0a1cd65 (diff) | |
add problem 1 statement
Diffstat (limited to 'src/Q1/README.md')
| -rw-r--r-- | src/Q1/README.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Q1/README.md b/src/Q1/README.md index c40e830..9a6e32f 100644 --- a/src/Q1/README.md +++ b/src/Q1/README.md @@ -4,6 +4,19 @@ Name: Mo Khan Student ID: 3431709 1. Problem Statement: + +Read three sentences from the console application. Each sentence should not exceed 80 characters. +Then, copy each character in each input sentence in a [3 x 80] character array. +The first sentence should be loaded into the first row in the reverse order of characters – for example, +"mary had a little lamb" should be loaded into the array as "bmal elttil a dah yram". +The second sentence should be loaded into the second row in the reverse order of words – for example, "mary had a little lamb" should be loaded into the array as "lamb little a had mary". +The third sentence should be loaded into the third row where if the index of the array is divisible by 5, +then the corresponding character is replaced by the letter ‘z’ – for example, +"mary had a little lamb" should be loaded into the array as "mary zad azlittze lazb" – that is, +characters in index positions 5, 10, 15, and 20 were replaced by ‘z’. +Note that an empty space is also a character, and that the index starts from position 0. +Now print the contents of the character array on the console. + 2. Description of the Code: 3. Errors and Warnings: 4. Sample Input and Output: |
