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 19:00
When keyboarding, if you want to be fast and accurate you should return your hands on home row with your fingers relaxed and your eyes on the text use only your index fingers to hunt and peck keep your fingers stiff and your eyes on the keys slouch in your chair and keep your fingers hovering over all of the keys
Answers: 2
question
Computers and Technology, 22.06.2019 10:00
Create a word problem that involves calculating the volume and surface area of a three-dimensional object. cube: surface area 6 s2 , volume s3
Answers: 3
question
Computers and Technology, 22.06.2019 21:30
Im doing this last minute and literally none of my neighbors or people that my dad works with use excel so if anyone could me make up an example
Answers: 1
question
Computers and Technology, 23.06.2019 04:00
Another name for addicting games.com
Answers: 1
You know the right answer?
Aprogrammer wants to define a method called myfunc() that takes a float type as an argument and retu...
Questions
question
English, 22.10.2020 01:01
question
Mathematics, 22.10.2020 01:01
question
Social Studies, 22.10.2020 01:01
Questions on the website: 13722361