Bryoh
05.11.2020 •
Computers and Technology
The following code is intended to test whether the int variable num is less than 10, and if so print a warning and set it to 10. The code then prints the value of num.
if (num < 10)
System.out.println( "This is smaller than 10" );
num = 10;
System.out.println("Value of num is " + num);
What correction should be made so the code functions as intended?
An else statement should be added between the 3rd and 4th lines
The final line should be printed every time, not just when num hasn’t been changed.
A semicolon should be added at the end of the first line
The operator ‘<’ should be changed to ‘<=’ in the if statement
No correction should be made
Curly braces ‘{ }‘ should be added to enclose the second and third lines
Solved
Show answers
More tips
- G Goods and services Which TV is better - LCD or Plasma?...
- S Sport How to Learn to Pull Up on Monkey Bars?...
- L Leisure and Entertainment Scrapbooking: What is it and Why is it Becoming More Popular?...
- C Computers and Internet Where did torrents.ru move to?...
- B Business and Finance Understanding Cash Flow: What It Is and How It Works...
- C Computers and Internet What Are Peers and Seeds in Torrenting?...
- H Health and Medicine 10 Simple Techniques on How to Boost Your Mood...
- G Goods and services How to Choose the Right High Chair for Your Baby?...
- S Style and Beauty Learn how to tie a keffiyeh on your head like a pro...
Answers on questions: Computers and Technology
- C Computers and Technology Implement the function _isPalindrome() in palindrome.py, using recursion, such that it returns True if the argument s is a palindrome (ie, reads the same forwards...
- C Computers and Technology GO16_AC_VOL1_GRADER_CAP_AS - InventorySupplies Project Description: In this project, you will apply skills you practiced from theObjectives in Access Chapters 1...
- C Computers and Technology For each of the following locking protocols, assulning that every transaction follows that locking protocol, state which of these desirable properties are ensured:...
- C Computers and Technology Consider the Partition algorithm we discussed in class. Partition(A) pivot = A[0], i = 1, j = A.length-1; // Let the leftmost element be the pivot while i =j //...
- C Computers and Technology Which of the following are the functions of an OS? An OS is responsible for managing and coordinating activities on a computer. The OS delegates booting of a system...
- B Biology An adult who follows a 2000-kcal healthy u.s.-style eating pattern should consume ounce-equivalents from the protein foods group per day....
- B Business Jason day company had bonds outstanding with a maturity value of $300,000. on april 30, 2017, when these bonds has an unamortized discount of $10,000, they were...
- E English What is the impact of the words equally, completeness, and united...
- C Computers and Technology Rint censored if userinput contains the word darn , else print userinput. end with newline. #include #include using namespace std; int main() { string userinput;...
- M Mathematics Module 10 coordinate proof using slope and distance answers is quadrilateral abcd a parallelogram? explain how you know....
Ответ:
The only correction I see is you need to add curly braces to enclose the second and third lines.
Ответ:
I'm certainly not an expert at anything related to ethernet, but I do believe that the answer you're looking for is a jam signal. To my limited understanding, CSMA/CD makes computers "listen" before sending data to see if their signal is currently being used. If it's not, it'll send. The computer and sender will continue to "listen" to see if a jam still occurred afterwards. If one did occur, a jam signal will be sent to everyone who may send something over that signal, warning them not to send anything else, since it will not be successful and may make the jam worse.
Hope this helped you out! I would normally tell the question–askers that they can ask me any additional questions they may have, but... that's the extent that I know about ethernet, haha! :-)