Advertisement
akosiraff

ArrayProgram

Apr 13th, 2014
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.17 KB | None | 0 0
  1.  
  2. Download: http://solutionzip.com/downloads/arrayprogram/
  3. Reference the following instructions to assist you when completing your Programming Using Arrays and Pointers assignment.
  4. • Using a for loop, print the contents of the array.
  5. The output should appear like this:
  6. PRINTING CONTENTS OF ARRAY
  7. ==================================
  8. A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
  9. • Change the program logic to prompt you for a position within the array that coincides with the letter. See the following example:
  10. This is the title to your Program related to the alphabet.
  11. Select the number that coincides with the alphabet.
  12. For example, the number 7 should display the letter G.
  13. Enter a number between 1 and 26: 4
  14. The number you selected: 4
  15. The letter related to this number: D
  16. • Write the code to update every other element within the array with a lowercase x. The output should appear like the following:
  17. PRINTING CONTENTS OF ARRAY and adding x to every other element
  18. A x C x E x G x I x K x M x O x Q x S x U x W x Y x
  19. • Write the code that will display only the even or odd numbered elements within the array. The output should appear as follows:
  20. PRINTING CONTENTS OF ARRAY USING THE MOD Option
  21. =====================================================
  22. Even Numbered Element = 0 Contents of Element within Array is = A
  23. Even Numbered Element = 2 Contents of Element within Array is = C
  24. Even Numbered Element = 4 Contents of Element within Array is = E
  25. Even Numbered Element = 6 Contents of Element within Array is = G
  26. Even Numbered Element = 8 Contents of Element within Array is = I
  27. Even Numbered Element = 10 Contents of Element within Array is = K
  28. Even Numbered Element = 12 Contents of Element within Array is = M
  29. Even Numbered Element = 14 Contents of Element within Array is = O
  30. Even Numbered Element = 16 Contents of Element within Array is = Q
  31. Even Numbered Element = 18 Contents of Element within Array is = S
  32. Even Numbered Element = 20 Contents of Element within Array is = U
  33. Even Numbered Element = 22 Contents of Element within Array is = W
  34. Even Numbered Element = 24 Contents of Element within Array is = Y
  35.  
  36. Download: http://solutionzip.com/downloads/arrayprogram/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement