Computers and Technology

Consider the following code segment, which is intended to print the digits of the two-digit int number num in reverse order. For example, if num has the value 75, the code segment should print 57. Assume that num has been properly declared and initialized. / missing code /
System. out. print(onesDigit);
System. out. print(tensDigit);
Which of the following can be used to replace / missing code / so that the code segment works as intended?
A int onesDigit = num % 10;
int tensDigit = num / 10;
B int onesDigit = num / 10;
int tensDigit = num % 10;
C int onesDigit = 10 / num;
int tensDigit = 10 % num;
D int onesDigit = num % 100;
int tensDigit = num / 100;
E int onesDigit = num / 100;
int tensDigit = num % 100;

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 21:10, jmolina57
Asample of 200 rom computer chips was selected on each of 30 consecutive days, and the number of nonconforming chips on each day was as follows: 8, 19, 27, 17, 38, 18, 4, 27, 9, 22, 30, 17, 14, 23, 15, 14, 12, 20, 13, 18, 14, 20, 9, 27, 30, 13, 10, 19, 12, 26. construct a p chart and examine it for any out-of-control points. (round your answers to four decimal places.)
Answers: 2
image
Computers and Technology, 23.06.2019 21:30, mariah10455
Write a fragment of code that reads in strings from standard input, until end-of-file and prints to standard output the largest value. you may assume there is at least one value. (cascading/streaming logic, basic string processing)
Answers: 3
image
Computers and Technology, 25.06.2019 02:30, 30valgolden
Technology has changed communications by replacing or supplementing traditional modes of communication that were primarily
Answers: 2
image
Computers and Technology, 25.06.2019 04:10, danny123421
8. create an abstract student class for parker university. the class contains fields for student id number, last name, and annual tuition. include a constructor that requires parameters for the id number and name. include get and set methods for each field; the settuition() method is abstract. create three student subclasses named undergraduatestudent, graduatestudent, and studentatlarge, each with a unique settuition() method. tuition for an undergraduatestudent is $4,000 per semester, tuition for a graduatestudent is $6,000 per semester, and tuition for a studentatlarge is $2,000 per semester. write an application that creates an array of at least six objects to demonstrate how the methods work for objects for each student type. save the files as student. java, undergraduatestudent. java, graduatestudent. java, studentatlarge. java, and studentdemo. java.
Answers: 1
Do you know the correct answer?
Consider the following code segment, which is intended to print the digits of the two-digit int numb...

Questions in other subjects:

Konu
Biology, 05.05.2020 02:24
Konu
Chemistry, 05.05.2020 02:24