subject

When breaking a problem down, you often encounter elements that you want to use repeatedly in your code. sometimes it's appropriate to write a new function; at other times it's appropriate to write a loop. what do you think? what kinds of circumstances would lead you to writing a function versus using a loop? show the output and hand trace the values of the variables during each iteration of the loops below. a. declare integer counter = 1while counter < 60display counterset counter = counter + 10end whileb. declare integer counter = 10while counter > 0set counter = counter - 2display counterend whilec. declare integer counterconstant integer max_value = 10for counter = 1 to max_value step 2display counterend for

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 09:30, caldonjoshhsms2061
What are the steps involved in accepting all the changes in a document? arrange these in order click edit. click accept or reject. click changes. click accept all.
Answers: 1
image
Computers and Technology, 22.06.2019 19:20, bob4059
1)consider the following code snippet: #ifndef book_h#define book_hconst double max_cost = 1000.0; class book{public: book(); book(double new_cost); void set_cost(double new_cost); double get_cost() const; private: double cost; }; double calculate_terms(book bk); #endifwhich of the following is correct? a)the header file is correct as given. b)the definition of max_cost should be removed since header files should not contain constants. c)the definition of book should be removed since header files should not contain class definitions. d)the body of the calculate_terms function should be added to the header file.
Answers: 1
image
Computers and Technology, 23.06.2019 03:00, Julianhooks
State 7 common key's for every keyboard
Answers: 1
image
Computers and Technology, 24.06.2019 03:30, laylay120
Other - a written response, no less than arial 12-point font, to the following: of the following, which would you consider is most important to customer service goals? choose one and explain why. (1) accuracy (2) punctuality and attendance (3) courtesy (4) productivity (5) organization
Answers: 1
You know the right answer?
When breaking a problem down, you often encounter elements that you want to use repeatedly in your c...

Questions in other subjects:

Konu
History, 10.06.2021 14:00
Konu
English, 10.06.2021 14:00
Konu
History, 10.06.2021 14:00