Thinking Like an Engineer: An Active Learning Approach (3rd Edition)
Thinking Like an Engineer: An Active Learning Approach (3rd Edition)
3rd Edition
ISBN: 9780133593211
Author: Elizabeth A. Stephan, David R. Bowman, William J. Park, Benjamin L. Sill, Matthew W. Ohland
Publisher: PEARSON
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 19, Problem 5ICA

What is stored in variable A after each of the following code segments is executed? If the program returns an error, indicate why.

  1. a. A=5;

if A/2>2

A= A*–1;

else

A = A/2;

End

  1. b. x=2; y=4; A=0;

if x + y<4

A= A+2;

elseif x+y <6

A = A + 4;

end

  1. c. T=6; A=–1;

if T/3>2

A = A*–1;

elseif T/3<=2

A = A+2;

end

  1. d. x=2; y=0; A=10;

if x<=0&&y<=0

A = A+2;

elseif x>=D&&y<0

A = A/2;

elseif x>=2&&y<=0

A = A*2;

end

Blurred answer
Students have asked these similar questions
The tooth numbers for the gear train illustrated are N₂ = 24, N3 = 18, №4 = 30, №6 = 36, and N₁ = 54. Gear 7 is fixed. If shaft b is turned through 5 revolutions, how many turns will shaft a make? a 5 [6] b
CE-112 please solve this problem step by step and give me the correct answer
CE-112 please solve this problem step by step and give me the correct answer

Chapter 19 Solutions

Thinking Like an Engineer: An Active Learning Approach (3rd Edition)

Knowledge Booster
Background pattern image
Mechanical Engineering
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, mechanical-engineering and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Precision Machining Technology (MindTap Course Li...
Mechanical Engineering
ISBN:9781285444543
Author:Peter J. Hoffman, Eric S. Hopewell, Brian Janes
Publisher:Cengage Learning
Text book image
Understanding Motor Controls
Mechanical Engineering
ISBN:9781337798686
Author:Stephen L. Herman
Publisher:Delmar Cengage Learning
Text book image
Automotive Technology: A Systems Approach (MindTa...
Mechanical Engineering
ISBN:9781133612315
Author:Jack Erjavec, Rob Thompson
Publisher:Cengage Learning
Text book image
Refrigeration and Air Conditioning Technology (Mi...
Mechanical Engineering
ISBN:9781305578296
Author:John Tomczyk, Eugene Silberstein, Bill Whitman, Bill Johnson
Publisher:Cengage Learning
Text book image
Electrical Transformers and Rotating Machines
Mechanical Engineering
ISBN:9781305494817
Author:Stephen L. Herman
Publisher:Cengage Learning
Text book image
International Edition---engineering Mechanics: St...
Mechanical Engineering
ISBN:9781305501607
Author:Andrew Pytel And Jaan Kiusalaas
Publisher:CENGAGE L
The Robot Revolution: The New Age of Manufacturing | Moving Upstream; Author: Wall Street Journal;https://www.youtube.com/watch?v=HX6M4QunVmA;License: Standard Youtube License