Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Do not use paper torn out of a spiral notebook if you hand draw the flow chart in Exercise 2. This will not be accepted..

image text in transcribed
Do not use paper torn out of a spiral notebook if you hand draw the flow chart in Exercise 2. This will not be accepted.. This exercise should be printed out, not hand written For these exercises, use well formed pseudocode following the convention discussed in this class. See the lecture on algorithm representation from week 1 for a refresher, as well as the comments from the first algorithm exercise Ex. 1: modulus groups A modulus group for a specific number is the set of numbers that all have the same modulus when divided by the specific number. For instance 34 mod 6 yields 4. Also 40 mod 6 yields 4. So 34 and 40 belong to the same modulus group for 6, Write pseudocode for a program that will allow the user to enter a modulus group number. Then they will be asked to enter 5 space separated values of positive integers whose modulus group for the group number will be calculated and reported. Test case: if the user entered 5 as the modulus group number and then enters 56 92 1371 The program would create the following result: The modulus 5 group for 56 is 1, for 92 is 2, for 13 is 3, for 7 is 2 and for 1 is 1 The user should be able to process this as often as they want, without exiting the program Ex. 2: Horizontal histograms Provide pseudocode for a program that will ask the user to enter 4 space separated positive integers that fall between 1 and 30 inclusively, and will than produce horizontal histograms A histogram is a graph whose length is proportional to the values represented. In this case, make each symbol worth 1. For example: if the user entered 510218, the histogram should look like 10 18* Extra credit: (2/10 points) is available if you provide flow charts for both exercises. But, if either pseudo code has more than 2 mistakes, no extra credit will be awarded. If you only provide a single flowchart, no extra credit wil be awarded

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

Students also viewed these Databases questions

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago