1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Neko [114]
2 years ago
6

Please help me on this coding problem :)

Computers and Technology
1 answer:
Vesnalui [34]2 years ago
4 0

Answer:

a=4 , b=1

Explanation:

I'm not a computer science major at all but I think I can help you with this code.

Our program wants us to add 2 to a get new a value while also subtracting 1 from b value to obtain new b value. We we want to for for as long b is not 0 and a/b is nonnegative.

One round we get:

New a=0+2=2

New b=3-1=2

Let's see if we can go another round:

New a=2+2=4

New b=2-1=1

We can't go another round because b would be negative while a is positive which would make a/b negative. So our loop stops at this 2nd round.

a=4 , b=1

Other notes:

2nd choice makes no sense because a is always going to increase because of the addition on a and b was going to decrease because of the subtraction on it.

Third choice makes no sense because a/b doesn't even exist.

Fourth choice a/b is negative not nonnegative.

You might be interested in
A Windows user contacted the help desk with a problem that requires the technician to connect to the remote computer using Remot
djverab [1.8K]

Answer:

RDP port 3389 .

Explanation:

A Windows user has informed the helpdesk with such an issue that requires the operator to link to the remote server through Remote Assistance to access the user's screen with a very comprehensive and ambiguous error message. Almost any attempt made by the operator to link to the remote access concludes in a message that says that the connection has been denied. To make this link, the following protocol and the port number combinations must be enabled on the firewall of the remote connection.

6 0
3 years ago
Picture related to cyber safety
Fantom [35]

Answer:

?????

Explanation:

4 0
2 years ago
Read 2 more answers
A large gambling company needs to be able to accept high volumes of customer wagers within short timeframes for high-profile spo
Dima020 [189]

Answer: A. a mobile app that only accepts wagers based on the user's location

Explanation:

Elastic cloud simply refers to the cloud computing offering which due to the need for change helps in the provision of variable service levels.

Based on the information given in the question, an effective elastic Cloud solution that can meet this client’s needs is a mobile app that only accepts wagers based on the user's location.

Since there are strict laws that prohibit gambling activities outside the licensed zones, the user location is vital in the mobile app.

5 0
3 years ago
Implementing multiple types of technology and thereby precluding that the failure of one system will compromise the security of
Setler79 [48]

Answer:

Redundancy

Explanation:

  • There are several redundant computer systems that can be applied to various operating systems and platforms.
  •  In any case, a server usually has redundant components, disks, network cards and power supplies.
  • The servers usually have two network cards with data redundancy, so in case of failure we will always have one of them available.
  • In conclusion, data redundancy is a fundamental system for the correct storage of the data available in the database.
5 0
2 years ago
Fill in the blank to make the following true.<br> 2 ** 3 =
avanturin [10]

Answer:

2 ** 3 = 8

Explanation:

7 0
2 years ago
Read 2 more answers
Other questions:
  • What does the picture indicate on the famous book “Dawn of the century”?​
    10·1 answer
  • The control programs managing computer hardware and software perform the _________ function to control and prioritize tasks perf
    8·1 answer
  • How does a color change if you add more gray to it
    7·1 answer
  • What is the location used by users to configure delegate access on their own mailboxes?
    14·2 answers
  • An organization is conducting a study to see if hazardous waste sites pose health risks for cancer or other conditions, such as
    12·1 answer
  • Letter only ^_____^!
    8·1 answer
  • With which feature or menu option of a word processing program can you make an image like this?
    14·2 answers
  • If you cannot find a template on your computer that was appropriate for your task, what should you do?
    12·1 answer
  • Which version of java should i use?.
    13·1 answer
  • You have been working as a junior data analyst at Bowling Green Business Intelligence for nearly a year. Your supervisor, Kate,
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!