Write the code that uses the integer variables sum and userI…
Write the code that uses the integer variables sum and userInput to accomplish the following tasks: 1. Create a do-while loop that continues until userInput is 0. 2. Inside the do-while loop, prompt the user to enter a number and store it in userInput. 3. Check if the entered number is divisible by 3. If it is, add that number to the sum variable. The number can be either positive or negative. 4. After the loop finishes, print a message that displays the value of the sum variable. Given the code: int sum = 0;int userInput;Scanner sc = new Scanner(System.in);//Write your code here:
Read DetailsQUESTION 4 – CHAPTER 6 Using Table 6-1 “Mandated Factors and…
QUESTION 4 – CHAPTER 6 Using Table 6-1 “Mandated Factors and Significant Subfactors to be Used in Source Selection” in the Engelbeck (2001) textbook, briefly describe the three factors listed as they related to source selection.
Read Details