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
docker41 [41]
3 years ago
9

1 import java.util.Scanner; 3 public class EqualityAndRelational { 4 public static void main (String args) args) { int userBonus

; int userPoints; userPoints-0; Scanner scnrnew Scanner(System.in); 7 10 userBonus = scnr.nextInt(); // Program will be tested with values : 15, 20, 25, 30, 35. 12 13 14 15 16 17 18 19 * Your solution goes here userPoints-10 else userPoints = 0;
Engineering
1 answer:
Anastaziya [24]3 years ago
7 0

Missing Part of the Question

Complete the expression so that userPoints is assigned with 0 if userBonus is greater than 20 (second branch). Otherwise, userPoints is assigned with 10 (first branch

import java.util.Scanner;

public class EqualityAndRelational {

public static void main (String args) args) {

int userBonus; int userPoints;

userPoints=0;

Scanner scnr = new Scanner(System.in);

userBonus = scnr.nextInt();

// Program will be tested with values : 15, 20, 25, 30, 35. 12 13 14 15 16 17 18 19

( Your solution goes here)

{

userPoints= 10 ;

}

else {

userPoints = 0;

}

}

}

Answer;

Replace

( Your solution goes here)

With

if(userBonus>20).

The full program becomes

import java.util.Scanner;

public class EqualityAndRelational {

public static void main (String args) args) {

int userBonus; int userPoints;

userPoints=0;

Scanner scnr = new Scanner(System.in);

userBonus = scnr.nextInt();

// Program will be tested with values : 15, 20, 25, 30, 35. 12 13 14 15 16 17 18 19

if(userBonus>20)

{

userPoints= 10 ;

}

else {

userPoints = 0;

}

}

}

You might be interested in
The Hoover Dam is 221 m tall and 379 m wide. Approximating it as a flat plate, determine the effective resultant force on the da
IrinaVladis [17]

Answer:

2165800 Pa

Explanation:

See it in the pic.

3 0
3 years ago
1. True/False The Pressure Relief valve maintains the minimum pressure in the hydraulic circuit​
elena55 [62]
Yeah it’s true. Good luck!!
3 0
3 years ago
Say you have a random, unordered list containing 4096 four-digit numbers. Describe the most efficient way to: sort the list and
Debora [2.8K]

Answer:

Answer explained below

Explanation:

It is given that numbers are four-digit so maximum value of a number in this list could be 9999.

So we need to sort a list of integers, where each integer lies between [0,9999].

For these given constraints we can use counting sort which will run in linear time i.e. O(n).

--------------------------------------------------------------------------------

Psuedo Code:

countSort(int numList[]) {

int count[10000];

count[i] = 0; for all i;

for(int num in numList){

count[num]+= 1;

}

return count;

}

--------------------------------------------------------------------------------

Searching in this count array will be just O(1).

E.g. Lets say we want to search if 3 was present in the original list.

Case 1: it was present in the original list:

Then the count[3] would have been incremented by our sorting algorithm. so in case element exists then count value of that element will be greater than 0.

Case 2: it was not present:

In this case count[3] will remain at 0. so in case element does not exist then count of that element will be 0.

So to search for an element, say x, we just need to check if count[x]>0.

So search is O(1).

Run times:

Sorting: O(n)

Search: O(1)

6 0
3 years ago
What is the shape of the output signal on a rigexpert analyzer?
Gekata [30.6K]

Answer:

Output signal shape: square, from 0.1 to 230 MHz. Output power: -10 dBm (at a load of 50 Ohms).

Explanation:

8 0
2 years ago
Read 2 more answers
An automated transfer line is to be designed. Based on previous experience, the average downtime per occurrence = 5.0 min, and t
IRINA_888 [86]

Answer:

a) 28 stations

b) Rp = 21.43

E = 0.5

Explanation:

Given:

Average downtime per occurrence = 5.0 min

Probability that leads to downtime, d= 0.01

Total work time, Tc = 39.2 min

a) For the optimum number of stations on the line that will maximize production rate.

Maximizing Rp =minimizing Tp

Tp = Tc + Ftd

=  \frac{39.2}{n} + (n * 0.01 * 5.0)

= \frac{39.2}{n} + (n * 0.05)

At minimum pt. = 0, we have:

dTp/dn = 0

= \frac{-39.2}{n^2} + 0.05 = 0

Solving for n²:

n^2 = \frac{39.2}{0.05} = 784

n = \sqrt{784} = 28

The optimum number of stations on the line that will maximize production rate is 28 stations.

b) Tp = \frac{39.2}{28} + (28 * 0.01 * 5)

Tp = 1.4 +1.4 = 2.8

The production rate, Rp =

\frac{60min}{2.8} = 21.43

The proportion uptime,

E = \frac{1.4}{2.8} = 0.5

3 0
3 years ago
Other questions:
  • Use the convolutional integral to find the response of an LTI system with impulse response ℎ(????) and input x(????). Sketch the
    8·1 answer
  • Ayuda porfavor es para una tarea de mi capacitación de desarrollo microempresarial
    14·1 answer
  • Air is compressed in the compressor of a turbojet engine. Air enters the compressor at 270 K and 58 kPa and exits the compressor
    13·1 answer
  • . A 10W light bulb connected to a series of batteries may produce a brighter lightthan a 250W light bulb connected to the same b
    8·2 answers
  • The acceleration (in m/s^2) of a linear slider (undergoing rectilinear motion) within a If the machine can be expressed in terms
    5·1 answer
  • If a machine uses LESS effort to overcome a given resistance force (if Fe is less than FR), it has an actual mechanical advantag
    13·1 answer
  • The number of pulses per second from IGBTs is referred to as
    10·1 answer
  • Is there anyone who can help me with welding?
    7·1 answer
  • What the minimum wire size for a general residential application on a 20 A circuit
    7·1 answer
  • 1. What did observations between 1912 and 1917 show?_____
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!