
Concept explainers
Answer the following questions.
a. For what integer values of D will the code between if and end execute?
if D >= – 1 && 3 > D
code
end
b. For what values of F will the code between if and end execute?
if F >= 100 || F <= 5
code
end
c. What combinations of values for B and Q will cause a warning to be displayed?
if B >100 || (B<20 && Q~=0)
fprintf ('WARNING! Pararneters out of bounds. \n')
end
a.

Find the integer values for which the code inside the if and end executes.
Answer to Problem 1ICA
The integer values for which the code inside the if and end executes are
Explanation of Solution
The English translation of the if statement says that, the if statement is true when the variable D is greater than or equal to -3 and less than 1.
So from the number line, the values of D for which the expression is true are
Conclusion:
Hence, the integer values for which the code inside the if and end executes are
b.

Find the integer values for which the code inside the if and end executes.
Answer to Problem 1ICA
The integer values for which the code inside the if and end executes are
Explanation of Solution
The English translation of the if statement says that, the if statement is true when the variable F is greater than or equal to 100 or less than or equal to 5.
So from the number line, the values of F for which the expression is true are
That is F can be any real number excluding numbers between 5 to 100.
Conclusion:
Hence, the integer values for which the code inside the if and end executes are
c.

Find the integer values for which the code inside the “if” and “end” executes.
Answer to Problem 1ICA
The integer values for which the code inside the “if” and “end” executes are
Explanation of Solution
The English translation of the if statement says that, the if statement is true when the variable B is greater than 100 or when B is less than 20 and Q is not 0.
So from the number line, the values of B and Q for which the expression is true are
Conclusion:
Hence, the integer values for which the code inside the “if” and “end” executes are
Want to see more full solutions like this?
Chapter 19 Solutions
Thinking Like an Engineer: An Active Learning Approach (3rd Edition)
- Correct Answer is written below(preferably handwritten solution) . Detailed and complete fbd only please. I will upvote, thank you.arrow_forwardThe pressure and temperature at the beginning of compression of a cold air-standard Diesel cycle are 100 kPa and 300 K , respectively. At the end of the heat addition, the pressure is 7.2 MPa and the temperature is 2050 K . Assume constant specific heats evaluated at 300 K . Determine:(a) the compression ratio.(b) the cutoff ratio.(c) the percent thermal efficiency of the cycle.(d) the mean effective pressure, in kPaarrow_forwardCorrect Answer is written below(preferably handwritten solution) . Detailed and complete fbd only please. I will upvote, thank you.arrow_forward
- Correct Answer is written below(preferably handwritten solution) . Detailed and complete fbd only please. I will upvote, thank you. 7: The round bar AB in the figure is formed into a quartercircular arc of radius R that lies in the horizontal plane. The bar is built in atB and carries the vertical force P at end A. Given: P = 3 kN, R = 900 mm andα = 25°.1. Calculate the bending moment (kN-m) acting at section C.2. Calculate the torsional moment (kN-m) acting at section C.3. If the allowable torsional stress is limited to 65 MPa, calculate therequired minimum diameter of the bar (mm).ANSWERS: 1.14 kN-m; 0.25 kN-m; 60 mmarrow_forwardCorrect Answer is written below(preferably handwritten solution) . Detailed and complete fbd only please. I will upvote, thank you.arrow_forwardCurrent Attempt in Progress A cold air-standard Otto cycle has a compression ratio of 9 and the temperature and pressure at the beginning of the compression process are 520°R and 14.2 lbf/in.², respectively. The heat addition per unit mass of air is 600 Btu/lb. Assume constant specific heats evaluted at 520°R. Determine: (a) the maximum temperature, in °R. (b) the maximum pressure, in lbf/in.² (c) the percent thermal efficiency. (d) the mean effective pressure, in lbf/in.²arrow_forward
- Correct Answer is written below(preferably handwritten solution) . Detailed and complete fbd only please. I will upvote, thank you.arrow_forwardCorrect answer and complete detailed fbd only. I will upvote. : The two steel shafts, each with one end builtinto a rigid support, have flanges attached to their freeends. The flanges are to be bolted together. However,initially there is a 6⁰ mismatch in the location of the boltholes as shown in the figure. Determine the maximumshear stress(ksi) in each shaft after the flanges have beenbolted together. The shear modulus of elasticity for steelis 12 x 106 psi. Neglect deformations of the bolts and theflanges.arrow_forwardCorrect detailed answer and complete fbd only. I will upvote. The compound shaft, composed of steel,aluminum, and bronze segments, carries the two torquesshown in the figure. If TC = 250 lb-ft, determine the maximumshear stress developed in each material (in ksi). The moduliof rigidity for steel, aluminum, and bronze are 12 x 106 psi, 4x 106 psi, and 6 x 106 psi, respectivelyarrow_forward
- Correct answer and complete fbd only. I will upvote. A flanged bolt coupling consists of two concentric rows of bolts. The inner row has 6 nos. of 16mm diameterbolts spaced evenly in a circle of 250mm in diameter. The outer row of has 10 nos. of 25 mm diameter bolts spaced evenly in a circle of 500mm in diameter. If the allowable shear stress on one bolt is 60 MPa, determine the torque capacity of the coupling. The Poisson’s ratio of the inner row of bolts is 0.2 while that of the outer row is 0.25 and the bolts are steel, E =200 GPa.arrow_forwardCorrect answer and complete fbd only. I will upvote. The shaft carries a total torque T0 that is uniformly distributedover its length L. Determine the angle of twist (degrees) of the shaft in termsif T0 = 1.2 kN-m, L = 2 m, G = 80 GPa, and diameter = 120 mmarrow_forward7) find the Emax for figure below. 250N Ans: Tmay 7.5 MPa Gomm 350mm 50mm 4arrow_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





