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 solutionChapter 19 Solutions
THINKING LIKE AN ENGINEER W/ACCESS
- Hi please help with this question thank you I just can't seem to work it out even with the given formulas. Thanks! also, I have tried these but they seem to be incorrect, or maybe parts of the calculation may be incorrect since when I submit these all together and I can't really work out where I am going wrong: sigma x = 25.43 sigma y = 13.07 Txy = 49.124arrow_forwardtwo cylinders are printed on a 3d printer, with a setting of 40% fill rate. This means that the solid parts of the cylinders at 40% plastic material. Given this, tell me how much plastic material is used to make each of these cylinders. I measured both cylinders in meters and these are the measurements below A) Cylinder 1- Height: 0.042m Radius 2(outer radius): 0.008m Radius 1(inner radius): 0.006m B) Cylinder 2 Height: 0.022m Radius 2(outer radius): 0.008m Radius 1(inner radius): 0.006marrow_forwardEngineering Economy A company has determined the price and the monthly demand of its products are related by the equation D = √775 - p, where p is the price per unit in dollar and D, is the monthly demand. The associated fixed costs are $2,125 per month and the variable costs are $100/ unit. Use this information to answer the following: a)What is the optimal number of units that should be produced and sold each month? b) What is the maximum profit? c)Determine the value of D that represents the break-even point?arrow_forward
- ᴡʜᴀᴛ ʟᴏᴀᴅ ɪɴ ɴ ᴍᴜꜱᴛ ʙᴇ ᴀᴘᴘʟɪᴇᴅ ᴛᴏ ᴀ 25 ᴍᴍ ʀᴏᴜɴᴅ ꜱᴛᴇᴇʟ ʙᴀʀ 2.5 ᴍ ʟᴏɴɢ (ᴇ = 207 ɢᴘᴀ. ᴛᴏ ꜱᴛʀᴇᴛᴄʜ ᴛʜᴇ ʙᴀʀ 1.3 ᴍᴍ?ᴀ) 52840 ɴʙ) 53000 ɴᴄ) 60000 ɴᴅ) 42000 ɴarrow_forwardYou own a wheat warehouse with a capacity of 20,000bushels. At the beginning of month 1, you have 6,000 bushels of wheat. Each month, wheat can be bought and sold at theprice per 1000 bushels given in Table 46.The sequence of events during each month is as follows:a You observe your initial stock of wheat.b You can sell any amount of wheat up to your initialstock at the current month’s selling price.c You can buy (at the current month’s buying price) asmuch wheat as you want, subject to the warehouse sizelimitation.Your goal is to formulate an LP that can be used to determine how to maximize the profit earned over the next 10monthsarrow_forwardfind out how to properly add or subtract numbers while taking into consideration the number of significant digits. Write a summary of the proper technique, then use the technique to solve the following cases: ( a) 1.006 + 23.47, (b) 703,200 − 80.4, and (c) 4.6903 − 14.58. Be careful to express your final answer to the appropriate number of significant digitsarrow_forward
- Hartley Electronics, Inc., in Nashville, producesshort runs of custom airwave scanners for the defense industry.The owner, Janet Hartley, has asked you to reduce inventory byintroducing a kanban system. After several hours of analysis, youdevelop the following data for scanner connectors used in onework cell. How many kanbans do you need for this connector?Daily demand 1,000 connectorsLead time 2 daysSafety stock 12 dayKanban size 500 connectorsarrow_forwardUse your matrix number by adding the last three digits to get the value of X on the velocityof plane A. The value of X will then need to be added with the digit of 150 as follows;Example; If your matrix number is AD190251,Velocity of plane A, VA = 150 + X km/hX = (2 + 5 + 1) = 8Therefore, the velocity of plane A, VA = 150 + X, = 150 + 8 = 158 km/h. SO MY LAST THREE DIGITS ARE: 008arrow_forwardGIVE ME THE COMPLETE SOLUTION FOR THISTHIS IS THE ANSWER ACC TO THE ANSWER KEY I JUST NEED HELP FOR THE SOLUTION Theta3/T = ((5*s^2 + 9*s + 9))/(15*s^5 + 47*s^4 + 117*s^3 + 161*s^2 + 81*s)arrow_forward
- PLEASE ANSWER THEM ALL FOR AN UPVOTE. THANK YOU. Given: Pi constant to be used: 3.14159 Capillary tube: radius = 0.02 cm; length = 9 cm; pressure = 0.7 mmHg Liquid sample: density = 4 ml; time of flow = 4.5 seconds Ans. the ff questions. •What is the pressure in MKS unit? •What is the pressure in CGS unit? •What is the viscosity of the liquid? • If the weight was given as 8.5 grams, what will be the density of the liquid? •What is the kinematic viscosity of the liquid? •What is the fluidity of the liquid?arrow_forwardOn your new small car, you replace the factory-installed P185/75R14 tires with slightly larger P205/75R14 tires. Find the missing number in each statement: Show all of your work. P185/75R14 (Old) P205/75R14 (New) Width(mm) Aspect Ratio (%) Height (in.) Diameter (in)arrow_forwardRead the question carefully and give me right solution according to the question. Use Superposition method.arrow_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