subject

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;

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:20
Consider the following code snippet: #ifndef cashregister_h#define cashregister_hconst double max_balance = 6000000.0; class cashregister{public: cashregister(); cashregister(double new_balance); void set_balance(double new_balance); double get_balance() const; private: double balance[12]; }; double get_monthly_balance(cashregister bk, int month); #endifwhich of the following is correct? a)the header file is correct as given.b)the definition of max_balance should be removed since header files should not contain constants.c)the definition of cashregister should be removed since header files should not contain class definitions.d)the body of the get_monthly_balance function should be added to the header file.
Answers: 1
question
Computers and Technology, 22.06.2019 22:00
During physical science class ben and jerry connected three identical lightbulbs in parallel to a battery where happens when ben removes one of the lightbulbs from it’s socket
Answers: 2
question
Computers and Technology, 23.06.2019 04:20
4. a1. vince owns a television repair shop that is insured undera commercial package policy. the policy includes thebuilding and personal property coverage form and thecauses-of-loss broad form. the declarations page indicatesthat coverage applies to both the building and the namedinsured's business property. explain whether or not thefollowing losses would be covered under his policy.a. a fire occurs on the premises, and the building isbadly damaged.b. a burglar steals some money and securities from anunlocked safe.c. a business computer is damaged by vandals whobreak into the shop after business hours.d. a tornado touches down near the store. several tel-evision sets of customers in the shop for repair aredamaged in the storm.til
Answers: 2
question
Computers and Technology, 23.06.2019 08:00
Match the items with their respective descriptions.
Answers: 1
You know the right answer?
Consider the following code segment, which is intended to print the digits of the two-digit int numb...
Questions
question
Mathematics, 05.10.2020 15:01
question
Mathematics, 05.10.2020 15:01
question
Mathematics, 05.10.2020 15:01
question
Mathematics, 05.10.2020 15:01
question
History, 05.10.2020 15:01
question
English, 05.10.2020 15:01
Questions on the website: 13722362