Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Ex1) IMPORTANT: You are required to provide preconditions and postconditions for each solution you provide. Ex 0) as a starter, read the provided flowchart
Ex1) IMPORTANT: You are required to provide preconditions and postconditions for each solution you provide. Ex 0) as a starter, read the provided flowchart for a computer program to receive two numbers and output the larger one. Assume the two number are not same. Convince yourself that both versions work correctly. Ex2) Ex 3) Ex 4) 22w Lab04 N-convert... Page 2 of 8 Ex 5) draw a flowchart for a computer program to receive two numbers as sides of a rectangle and output the rectangle's perimeter, in the form of "Perimeter: x" where x is the perimeter. Save your work as img_01.jpg draw a flowchart for a computer program to receive three numbers and store them in memory spaces called a, b, and c as three semi-axes of an ellipsoid, and calculate and output the volume of this ellipsoid, in the form of "volume: x" where x is the volume. Figure out the formular from the internet. Save your work as img_02.jpg draw a flowchart for a computer program to receive three floating point numbers and store them in memory spaces called a, b, and c, and return the largest number of the three, in the form of "largest: x" where x is the largest value. Assume the three number are all different. Hint: you can compare pair of the values and there are several cases to consider, but a simpler way to compare is, as you see in the SMQ1, check if a is larger than b AND also is larger than c. If yes you got the answer. If not (else), check if b is larger than a AND also larger than c, if yes you got answer, if not, you also got the answer. If.... else if.... else should be enough. Save your work as img_03.jpg draw a flowchart to receive three numerical coefficients of a quadratic equation and determines if it has two distinct real roots, one root, or no roots in real numbers, output "it has 2 distinct roots, "its roots are identical", "it has no roots in real numbers" respectively. This page might be a good reference: https://www.math10.com/en/algebra/quadratic-equation.html Save your work as img_04.jpg assume there is a webpage containing an HTML input of type text and a button. When the button is clicked, a function named divisible By6 is called. Draw a flowchart for the function, that receive a number, and first check whether the input is divisible by 6 or not, outputting "divisible by 6" or "not divisible by 6", respectively. Then, further check if the input is zero, and if it is zero, also outputs "program ended". Hint: you need two if clauses, one after another. First check if the input is divisible by 6, and output accordingly, and then check if the input is 0 or not. Save your work as img_05.jpg. IMPORTANT RESTRICTION: you are not allowed to use the modulus 6 to verify the remainder whether the number is divided by 6. You can do any other math trick you wish. Ex 6A) draw a flowchart to receive a number from 0~100, and map it to a letter grade based on York standard. Use if.. else if.. else if... You may need to look at this reference: http://calendars.registrar.yorku.ca/2012-2013/academic/grades/index.htm To simplify, assume no letter grade E, i.e., if the grade is below 50, it's mapped to F. Save your work as img_06A.jpg. Ex 6B) draw a flowchart to receive a number from 0~100, and map it to a letter grade based on York standard. Use the "many case" style shown in class (which corresponds to switch cases struct in JS programming language). Again assume no letter grade E. Save your work as img_06B.jpg.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started