subject

Aprogrammer wants to define a method called myfunc() that takes a float type as an argument and returns an int type. when called as indicated below, the method call should result in a value of 3.0 for the variable z. float z = myfunc( 23f ); // method called from main() public static int myfunc( float x ) { /* … missing code segment … */ return result; } which of the following code segments will produce the correct result when substituted in the myfunc() method? i. int result = x / 7; ii. int result = (int) x / 7; iii. int result = x; result /= 7;

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 17:00
How can data be added to a new table in data base
Answers: 1
question
Computers and Technology, 23.06.2019 23:30
A. in packet tracer, only the server-pt device can act as a server. desktop or laptop pcs cannot act as a server. based on your studies so far, explain the client-server model.
Answers: 2
question
Computers and Technology, 24.06.2019 12:00
What is a sketch or blueprint of a web page that shows the structure (but not the detailed design) of basic page elements such as the logo, navigation, content, and footer?
Answers: 3
question
Computers and Technology, 25.06.2019 00:40
Roger ginde is developing a program in supply chain management certification for managers. ginde has listed a number of activities that must be completed before a training program of this nature could be conducted. the activities, immediate predecessors, and times appear in the accompanying table: activity immediate predecessor(s) time (days) a -− 44b -− 55 c -− 11 d b 1010 e a, d 55 f c 55 g e, f 1010 calculate the slack time. show the details.
Answers: 2
You know the right answer?
Aprogrammer wants to define a method called myfunc() that takes a float type as an argument and retu...
Questions
Questions on the website: 13722363