logo

Pseudocode and C++ Programming

   

Added on  2019-09-16

2 Pages890 Words424 ViewsType: 424
 | 
 | 
 | 
Write a detailed pseudocode solution for each of the following problems. Then, using your pseudocode, convert your pseudocode into C++ programs. Here are the things you need to do foreach problem:Design your solutions to produce the program output like that given for each of the problems. Note: Your program should work correctly for any valid user input, not just for the example user input values given.Convert your pseudocode into C++ code. Follow the coding guidelines specified in the Coding Guidelines posted on D2L. Remember to use appropriate data types for all variables. Remember to include each name of your group in a comment at the top of the program. Compile and run the program and verify that it works properly for a variety of input values. What you need to turn in: A printed copy of your pseudocode and your C++ code for each of the problems, arranged in order, and stapled together. Include each name of your group on the front page of what you turn in. Clearly identify which pseudocode and C++ code solves which problem. Use a word processor to write and print your pseudocode. Email all source code (.cpp files) as individual attachments. On the subject line, put CSCI 1500 & the assignment number.1. Arrays The Fibonacci sequence is a list of numbers in which the first two numbers in the list are both one and each successive number is the sum of the previous two numbers. This means that the first eight Fibonacci numbers are 1, 1, 2, 3, 5, 8, 13, 21. Write a program that will calculate and store the first 20 Fibonacci numbers in an array. Then print a table consisting of each of the first 20 Fibonacci numbers greater than one along with the ratio of that Fibonacci number to its predecessor, shown to 8 digits of accuracy. Here is what the first few lines of output should look like from running your program:FIB# RATIO2 2.000000003 1.500000005 1.666666678 1.6000000013 1.6250000021 1.615384622. Arrays Write a program that will prompt for and read in a list of up to ten computer store names and the corresponding price that each store charges for a particular model of PC, and will then determine the lowest price charged for that PC among the stores input. Then, the program should print two lists:List 1 – The names of all stores charging the lowest price.List 2 – The names and prices for all stores whose price does not exceed the lowest price by more than 10%.Hint: Use two arrays - one to store the names and the other to store the prices. 3.Arrays of Counting Variables. A company pays its salespeople on a commission basis. The salespeople receive a weekly take-home salary of $200 per week plus 9% of their gross sales for that week. For example, a salesperson who grosses $5000 in sales in a week receives $200 plus 9% of $5000, or a total of $650. Write a program that will repeatedly prompt for and read in a weekly gross sales amount for each individual salesperson and then calculate and display her take-home salary. In addition, the program should calculate and display the combined total
Pseudocode and C++ Programming_1

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
K-Headix Sorting
|2
|1031
|262

University Admission Application Centre
|3
|883
|225

Functions in Python
|4
|988
|573

Ordering Meals in a Restaurant
|15
|4518
|489

MS5 Open Submission
|43
|13942
|546