Write a detailed pseudocode solution for each of the following

Added on - 16 Sep 2019

  • 2

    Pages

  • 890

    Words

  • 155

    Views

  • 0

    Downloads

Trusted by +2 million users,
1000+ happy students everyday
Showing pages 1 to 1 of 2 pages
Write adetailedpseudocodesolution for each of the following problems. Then, using yourpseudocode,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 theproblems. Note: Your program should work correctly for any valid user input, not just forthe example user input values given.Convert your pseudocode into C++ code. Follow the coding guidelines specified in theCoding Guidelinesposted 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 ofthe problems, arranged in order, and stapled together. Include each name of your group on thefront page of what you turn in. Clearly identify which pseudocode and C++ code solves whichproblem. Use a word processor to write and print your pseudocode. Email all source code (.cppfiles) as individual attachments. On the subject line, put CSCI 1500 & the assignment number.1.ArraysThe Fibonacci sequence is a list of numbers in which the first two numbers in the listare both one and each successive number is the sum of the previous two numbers. This meansthat the first eight Fibonacci numbers are 1, 1, 2, 3, 5, 8, 13, 21. Write a program that willcalculate and store the first 20 Fibonacci numbers in an array. Then print a table consisting ofeach of the first 20 Fibonacci numbers greater than one along with the ratio of that Fibonaccinumber to its predecessor, shown to 8 digits of accuracy. Here is what the first few lines ofoutput should look like from running your program:FIB# RATIO2 2.000000003 1.500000005 1.666666678 1.6000000013 1.6250000021 1.615384622. ArraysWrite a program that will prompt for and read in a list of up to ten computer storenames and the corresponding price that each store charges for a particular model of PC, and willthen determine the lowest price charged for that PC among the stores input. Then, the programshould 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 priceby 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. Thesalespeople receive a weekly take-home salary of $200 per week plus 9% of their gross sales forthat week. For example, a salesperson who grosses $5000 in sales in a week receives $200 plus9% of $5000, or a total of $650. Write a program that will repeatedly prompt for and read in aweekly gross sales amount for each individual salesperson and then calculate and display hertake-home salary. In addition, the program should calculate and display the combined total
desklib-logo
You’re reading a preview
Preview Documents

To View Complete Document

Click the button to download
Subscribe to our plans

Download This Document