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]
3 years ago
6

Please help me on this coding problem :)

Computers and Technology
1 answer:
Vesnalui [34]3 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
Write a second convertToInches() with two double parameters, numFeet and numInches, that returns the total number of inches. Ex:
mixer [17]

Answer:

   public static double convertToInches(double numFeet, double numInches){

       return (numFeet*12)+numInches;

   }

Explanation:

This technique of having more than one method/function having the same name but with different parameter list is called method overloading. When the method is called, the compiler differentiates between them by the supplied parameters. The complete program is given below

public class FunctionOverloadToInches {

   public static void main(String[] args) {

       double totInches = 0.0;

       totInches = convertToInches(4.0, 6.0);

       System.out.println("4.0, 6.0 yields " + totInches);

       totInches = convertToInches(5.9);

       System.out.println("5.9 yields " + totInches);

       return;

   }

   public static double convertToInches(double numFeet)

       {

           return numFeet * 12.0;

       }

       /* Your solution goes here */

   public static double convertToInches(double numFeet, double numInches){

       return (numFeet*12)+numInches;

   }

}

5 0
3 years ago
Is the IOT governable by frameworks? Explain your rationale.
polet [3.4K]

Answer:

Absolutely yes.

Explanation:

IoT is an acronym for Internet of Things. This is a system of network devices connected together in order to transmit data over the internet. And since communication of these devices is over the internet, there's a need for some protocols for control and moderation. Hence, the need for IoT governance frameworks.

Some of the aspects that should be governed by these frameworks are;

i. Data confidentiality:

Data such as Social Security Numbers, Bank Verification Numbers and Credit card details, that are being transmitted in an IoT system should be assured of protection from unwanted usage or access.

ii. Data integrity:

These data should also be assured of consistency and accuracy over a long period of time.

iii. Accountability:

When there is a breach or some sort of mishappening, there has to be a body that would be held accountable.

8 0
3 years ago
*****HELP******
trasher [3.6K]

Answer:

True

Explanation:

The Most Favored Nation (MFN) status and national treatment are provided for in article 4 of the Trade Related Aspects of Intellectual Property Rights (TRIPS) Agreement and it is stated that when a member grants favor, advantage, immunity , or privilege to citizens of a country, the country shall grant similar favor, privileges and advantages to the citizens of the other members

Therefore;

<em>True</em> Most Favored Nation (MFN) status and national treatment are also included in the Agreement on Trade-Related Aspects of intellectual Property Rights (TRIPS).

5 0
3 years ago
I NEED HELP ASAP IM BAD AT THIS
ra1l [238]

A float is a floating point number. This means that's the number has a decimal place. Numbers with or without decimal places can be stored in a float variable but more commonly numbers with decimal points.

The correct choices are 1 and 3.4

4 0
3 years ago
In the context of in-house software development options, a firm that enhances a commercial package by adding custom features and
Artyom0805 [142]

In the context of in-house software development options, a firm that enhances a commercial package by adding custom features and configuring it for a particular industry is called a(n) value-added reseller (VAR).

<h3>What is VAR?</h3>

A Value-Added Reseller (VAR) is a company that depends on the production of other firms. They improve the commission of a product or add a unique feature on it and sell that part as a whole apart good. The disadvantage of this practice relies on not maintaining control over the manufacturing prices since these things do not understand what precisely will be delivered next.

To learn more about VAR, refer to:

brainly.com/question/22679694

#SPJ4

7 0
2 years ago
Other questions:
  • Which of the following is where you can save, select a template, change document properties, and close or exit excel?
    8·1 answer
  • It is important to create an IT security program structure that aligns with program and organizational goals and describes the o
    6·1 answer
  • Use the ________ method to write text to a web page.
    12·1 answer
  • The intellectual property right that gives a creator control of his or her written work is known as what?
    9·1 answer
  • In dynamic programming, the technique of storing the previously calculated values is called A. Saving value property B. Storing
    7·1 answer
  • The process of learning by making mistakes and by trial and error is called _____.
    6·1 answer
  • 11
    7·1 answer
  • This code --&gt; plt.plot(x,y) is used to draw :
    8·1 answer
  • What is the maximum number of extended partitions can you have on a hard drive?
    14·1 answer
  • Ginny just enrolled in a C-SNP that uses the post-enrollment verification method. When will the plan send her a termination noti
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!