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
bagirrra123 [75]
2 years ago
6

What is the output for the following program?

Computers and Technology
1 answer:
murzikaleks [220]2 years ago
6 0

Answer:

13

Explanation:

int numA = 4;

whilie (numA < 12){

  numA += 3;

}

System.out.print(numA);

numA          numA < 12

  4                   true <em>⇒ numA increases by 3, loop continues </em>

  7                   true <em>⇒ numA increases by 3, loop continues </em>

  10                 true<em> ⇒ numA increases by 3, loop continues</em>

  13                 false <em>⇒ loop stops, program them prints out value of numA </em>

You might be interested in
In cell G6, use the appropriate lookup and reference function to retrieve the rental rate from the named range RentalRates. The
lora16 [44]

=VLOOKUP($A6,RentalRates,2,0) is the lookup for this.

<u>Explanation:</u>

Utilize the LOOKUP capacity to look into an incentive in a one-section or one-push go, and recover an incentive from a similar situation in another segment or one-push go. The query work has two structures, vector and cluster. This article depicts the vector structure.

In computer science, a lookup table is a cluster that replaces run time calculation with a more straightforward exhibit ordering activity. The investment funds as far as handling time can be critical, since recovering an incentive from memory is regularly quicker than experiencing a "costly" calculation or information/yield activity.

5 0
3 years ago
Data mining is defined as: a)Separating data and programs such that each can be changed without changing the other b)Allowing ma
nikitadnepr [17]

Answer:

C

Explanation:

In simple words, data mining is defined as a process used to extract usable data from a larger set of any raw data. It implies analysing data patterns in large batches of data using one or more software.

7 0
3 years ago
company gives the following discount if you purchase a large amount of supply. Units Bought Discount 10 - 19 20% 20 - 49 30% 50
ratelena [41]

Answer:

In Python:

order = int(input("Order: "))

discount = 0

if(order >= 10 and order <20):

    discount = 0.20

elif(order >= 20 and order <50):

    discount = 0.30

elif(order >= 50 and order <100):

    discount = 0.35

elif(order >= 100):

    discount = 0.40

price = order * 4.1

discount = discount * price

print("With your order of "+str(order)+" items, the total value will be $"+str(round(price,2))+" with a discount of $"+str(round(discount,2))+" for a final price of $"+str(round((price-discount),2)))

Explanation:

This prompts the user for number of orders

order = int(input("Order: "))

This initializes the discount to 0

discount = 0

For orders between 10 and 19 (inclusive)

if(order >= 10 and order <20):

-----------discount is 20%

    discount = 0.20

For orders between 20 and 49 (inclusive)

elif(order >= 20 and order <50):

-----------discount is 30%

    discount = 0.30

For orders between 50 and 99 (inclusive)

elif(order >= 50 and order <100):

-----------discount is 35%

    discount = 0.35

For orders greater than 99

elif(order >= 100):

-----------discount is 40%

    discount = 0.40

This calculates the total price

price = order * 4.1

This calculates the pre discount

discount = discount * price

This prints the report

print("With your order of "+str(order)+" items, the total value will be $"+str(round(price,2))+" with a discount of $"+str(round(discount,2))+" for a final price of $"+str(round((price-discount),2)))

3 0
2 years ago
The major objective of this lab is to practice class and object-oriented programming (OOP), and separate files: 1. We will reuse
vovangra [49]

Answer:

Implementation of resistor.cpp

#include "resistor.h"

Ohms::Ohm()

{

// default constructor

voltage=0;

}

Ohms::Ohm( double x) // parameterised constructor

{

voltage = x; // voltage x set to the supply voltage in the private data field called voltage

}

Ohms:: setVoltage(double a)

{

voltage = a;// to set supply voltage in private data field called voltage

}

Ohms::setOneResistance( String s, double p)

{

cin>>p; //enter the resistance value

if(p<=0) // if resistance is less than or equals to 0

return false

else // if re

cin.getline(s);

}

Ohms::getVoltage()

{

return voltage; //return voltage of ckt

}

Ohms::getCurrent()

{

return current; //return current of ckt

}

Ohms:: getNode()

{

return resistors; //return resistors of ckt

}

Ohms::sumResist()

{

double tot_resist = accumulate(resistors.begin(),resistors.end(),0); //std::accumulate function for calculating sum //of vectors and following are the starting and ending points

return tot_resist;

}

Ohms::calcCurrent()

{

if(current <=0) // if current is less than or equal to 0

return false;

else   // if current is greater than 0

return true;

}

Ohms:: calcVoltageAcross()

{

if(voltage<=0) // if voltage is less than or equal to 0

return false;

else //if voltage greater than 0

return true;

}

Explanation:

in the case of main.cpp its simple just make a class object and remember to include resistors.cpp with it for which the second last picture describes the process precisely. (Hint: Use theunit test case functions in the main.cpp).

As you can see node is a structure consisting of member variables, followed by a class Ohms representing a DC circuit.

By looking at these pictures, it is needed to implement the main.cpp and resistor.cpp files. The user defined header file resistor.h already consists of all contents of Class Ohm, struct node. You don't need to modify it in anyway in such case.

8 0
3 years ago
Antivirus software products require that you update _____ on a regular basis
german
Operating System, as far as I know @[email protected]
5 0
3 years ago
Read 2 more answers
Other questions:
  • When you first start your computer, which software will have to start first?
    5·2 answers
  • Which statement most aptly defines the term networking?
    8·1 answer
  • The central processing unit (CPU) processes the data in a computer systenpical data processing includes:
    10·1 answer
  • You’re configuring a Web-based intranet application on the WebApp server, which is a domain member. Users authenticate to the We
    13·1 answer
  • What is the component on the motherboard that confirms all devices are in working order once the computer is turned on?
    13·1 answer
  • Select the correct answer.
    15·2 answers
  • What is true about super computers?
    15·1 answer
  • Cuantos MB son 8,192 kb?​
    13·1 answer
  • takes the perspective that a program describes what the solution to a problem is, not how that problem is solved. Select one: a.
    5·1 answer
  • What method is used in the following line of code to associate clicking the left button with the event handler "clickSingle"?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!