PRG 218 Control Statements, Arrays, and Functions
You will Write eight assignment 70- to 100-word response to the following:
1 Supporting Activity: If Statements
What are some practical applications of if statements? How does an if statement in programming relate to logical decision making? Cite a specific example
.
2 Supporting Activity: Loops
What are some practical applications of loops? Why are loops used in programming?
3 Supporting Activity: Functions
What advantages do functions offer you as a programmer? Under what circumstances do you use functions in an actual program? Cite specific examples
4 Supporting Activity: Passing-by
Describe the different methods of passing-by-value, passing-by-reference, and passing-by-pointer. Provide a simple example. What do they have in common? How are they different?
5 Ch. 3, of Ivor Horton’s Beginning Visual C++ 2012
Write a program that reads numbers from cin and then sums them, stopping when 0 has been entered. Construct three versions of this program, using the while, do-while, and for loops
6 Ch. 3, of Ivor Horton’s Beginning Visual C++ 2012
Write a program to read characters from the keyboard and count the vowels. Stop counting when a Q (or a q) is encountered. Use a combination of an indefinite loop to get the characters, and a switch statement to count them.
Programming Using Arrays and Pointers
Use the program, Arrays of Pointers, in Ch. 4, of the text on p. 157 of as a starting point for this assignment. The link to Ch. 4, of the text on p. 157 is in the attachment file
Refer to Appendix C for full directions on the changes to the program you must make to complete this assignment.
Appendix C
Referencethe following instructions to assist you when completing your Programming Using Arrays and Pointers assignment.
•Using a for loop, print the contents of the array.
The output should appear like this:
PRINTING CONTENTS OF ARRAY
==================================
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
•Change the program logic to prompt you for a position within the array that coincides with the letter. See the following example:
This is the title to your Program related to the alphabet.
Select the number that coincides with the alphabet.
For example, the number 7 should display the letter G.
Enter a number between 1 and 26: 4
The number you selected: 4
The letter related to this number: D
•Write the code to update every other element within the array with a lowercase x. The output should appear like the following:
PRINTING CONTENTS OF ARRAY and adding x to every other element
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
•Write the code that will display only the even or odd numbered elements within the array. The output should appear as follows:
PRINTING CONTENTS OF ARRAY USING THE MOD Option
=====================================================
Even Numbered Element = 0 Contents of Element within Array is = A
Even Numbered Element = 2 Contents of Element within Array is = C
Even Numbered Element = 4 Contents of Element within Array is = E
Even Numbered Element = 6 Contents of Element within Array is = G
Even Numbered Element = 8 Contents of Element within Array is = I
Even Numbered Element = 10 Contents of Element within Array is = K
Even Numbered Element = 12 Contents of Element within Array is = M
Even Numbered Element = 14 Contents of Element within Array is = O
Even Numbered Element = 16 Contents of Element within Array is = Q
Even Numbered Element = 18 Contents of Element within Array is = S
Even Numbered Element = 20 Contents of Element within Array is = U
Even Numbered Element = 22 Contents of Element within Array is = W
Even Numbered Element = 24 Contents of Element within Array is = Y
Attachments:
application/pdf iconbeginning_visual_c_2012_ch04_2.pdf
Are you looking for a similar paper or any other quality academic essay? Then look no further. Our research paper writing service is what you require. Our team of experienced writers is on standby to deliver to you an original paper as per your specified instructions with zero plagiarism guaranteed. This is the perfect way you can prepare your own unique academic paper and score the grades you deserve.
Use the order calculator below and get started! Contact our live support team for any assistance or inquiry.
[order_calculator]