
While experimenting with coding sequences, you decide to try a modification of the factorial sequence by calculating the product of consecutive odd integers instead of all consecutive integers. You call this sequence OFact. The first four values of the OFact sequence are:
OFact (1) = 1
OFact (2) = 1*3=3
OFact (3) = 1*3*5=15
OFact (4) = 1*3*5*7=105
Write a program that will ask the user for a maximum sequence value desired, and then print the OFact sequence to the command window as long as the value calculated does not exceed the maximum value entered by the user. For example, if the user specifies a maximum of 100. It would print the first three values since QFact(4) = 105 > 100. This should be printed in two columns: N in the first column and OFact(N) in the second column. All values generated should be stored in the
When the program reaches the maximum value, a message should be printed that states:
Where XXX is the maximum entered by the user, Y is the sequence number of the calculated value, and ZZZ is the last calculated value.

Want to see the full answer?
Check out a sample textbook solution
Chapter 19 Solutions
Thinking Like An Engineer: An Active Learning Approach, Student Value Edition (4th Edition)
- 1 8 4 Add numbers so that the sum of any row or column equals .30 Use only these numbers: .1.2.3.4.5.6.10.11.12.12.13.14.14arrow_forwardUppgift 2 (9p) I77777 20 kN 10 kN/m 4 [m] 2 2 Bestäm tvärkrafts- och momentdiagram för balken i figuren ovan. Extrempunkter ska anges med både läge och värde i diagrammen.arrow_forward**Problem 8-45.** The man has a mass of 60 kg and the crate has a mass of 100 kg. If the coefficient of static friction between his shoes and the ground is \( \mu_s = 0.4 \) and between the crate and the ground is \( \mu_c = 0.3 \), determine if the man is able to move the crate using the rope-and-pulley system shown. **Diagram Explanation:** The diagram illustrates a scenario where a man is attempting to pull a crate using a rope-and-pulley system. The setup is as follows: - **Crate (C):** Positioned on the ground with a rope attached. - **Rope:** Connects the crate to a pulley system and extends to the man. - **Pulley on Tree:** The rope runs over a pulley mounted on a tree which redirects the rope. - **Angles:** - The rope between the crate and tree forms a \(30^\circ\) angle with the horizontal. - The rope between the tree and the man makes a \(45^\circ\) angle with the horizontal. - **Man (A):** Pulling on the rope with the intention of moving the crate. This arrangement tests the…arrow_forward
- please solve this problems follow what the question are asking to do please show me step by steparrow_forwardplease first write the line action find the forces and them solve the problem step by steparrow_forwardplease solve this problem what the problem are asking to solve please explain step by step and give me the correct answerarrow_forward
- please help me to solve this problem step by steparrow_forwardplease help me to solve this problem and determine the stress for each point i like to be explained step by step with the correct answerarrow_forwardplease solve this problem for me the best way that you can explained to solve please show me the step how to solvearrow_forward
- Elements Of ElectromagneticsMechanical EngineeringISBN:9780190698614Author:Sadiku, Matthew N. O.Publisher:Oxford University PressMechanics of Materials (10th Edition)Mechanical EngineeringISBN:9780134319650Author:Russell C. HibbelerPublisher:PEARSONThermodynamics: An Engineering ApproachMechanical EngineeringISBN:9781259822674Author:Yunus A. Cengel Dr., Michael A. BolesPublisher:McGraw-Hill Education
- Control Systems EngineeringMechanical EngineeringISBN:9781118170519Author:Norman S. NisePublisher:WILEYMechanics of Materials (MindTap Course List)Mechanical EngineeringISBN:9781337093347Author:Barry J. Goodno, James M. GerePublisher:Cengage LearningEngineering Mechanics: StaticsMechanical EngineeringISBN:9781118807330Author:James L. Meriam, L. G. Kraige, J. N. BoltonPublisher:WILEY





