# What is the pseudocode output for following inputs?

1) The following function, written in pseudocode, inputs INCOME as a variable and outputs the TAX corresponding to that income. You can think of this…

1) The following function, written in pseudocode, inputs INCOME as a variable and outputs the TAX corresponding to that income. You can think of this as a greatly simplified income tax. 1. IF (INCOME = 90,000) THEN a. TAX ? 14,000 + 0.3 (INCOME – 90,000) 2. ELSE a. IF (INCOME = 40,000) THEN i. TAX ? 4,000 + 0.2 (INCOME – 40,000) b. ELSE i. TAX ? 0.10 INCOME What is the pseudocode output for the following inputs? Explain your solution. a) 27,000 b) 98,000 c) 65,000 This problem is similar to Example 6 and to Exercise 1 in Appendix A of your SNHU MAT230 textbook. 2) Suppose that the array X consists of real numbers X[1], X[2], …, X[N]. Write a pseudocode program to compute the minimum of these numbers. This problem is similar to Example 12 and to Exercises 13–16 in Appendix A of your SNHU MAT230 textbook. 3) Consider the following algorithm; assume N to be a positive integer. 1. X ? 0 2. Y ? 1 3. WHILE (X a. X ? X + 1 b. Y ? Y + 2 X 4. Y ? Y / N Calculate what value of Y the algorithm will compute for the following values of N. Explain your solution. a) N = 3 b) N = 5 This problem is similar to Example 7 and to Exercise 22 in Appendix A of your SNHU MAT230 textbook. 4) Use the Euclidean algorithm to find the greatest common divisor d of 313,626 and 152,346. Then use this algorithm to find integers s and t to write d as 313,626 s + 152,346 t. Solving these types of equations, for much larger integers, is central to encryption schemes such as RSA (public key) encryption. This problem is similar to Examples 5 and 6 and to Exercises 6–9 in Section 1.4 of your SNHU MAT230 textbook.
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "https://homeworkprospect.com/what-is-the-pseudocode-output-for-following-inputs/", "fetch_time": 1579532050000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2020-05/segments/1579250598800.30/warc/CC-MAIN-20200120135447-20200120164447-00022.warc.gz", "warc_record_offset": 474131967, "warc_record_length": 20985, "token_count": 518, "char_count": 1808, "score": 3.5, "int_score": 4, "crawl": "CC-MAIN-2020-05", "snapshot_type": "latest", "language": "en", "language_score": 0.8651416897773743, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00057-of-00064.parquet"}