answer.
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
Marizza181 [45]
2 years ago
6

Write an if statement that assigns 10,000 to the variable bonus if the value of the variable goodsSold is greater than 500,000.

Assume bonus and goodsSold have been declared and initialized.
Computers and Technology
1 answer:
aev [14]2 years ago
3 0

Answer:

if(goodsSold>500000){

bonus = 10000;

}

Explanation:

A complete Java program that prompts user to enter value for goodsSold is given below:

<em>import java.util.Scanner;</em>

<em>public class num14 {</em>

<em>    public static void main(String[] args) {</em>

<em>        Scanner in = new Scanner(System.in);</em>

<em>        System.out.println("Enter goods Sold: ");</em>

<em>        int goodsSold = in.nextInt();</em>

<em>        int bonus =0;</em>

<em>        if(goodsSold>500000){</em>

<em>            bonus=10000;</em>

<em>        }</em>

<em>        System.out.println("You bonus for "+goodsSold+" is "+bonus);</em>

<em>    }</em>

<em>}</em>

You might be interested in
Cloud storage refers to the storage of data on ______.a. your mobile device.b. your desktop computer.c. an external drive.d. a s
eimsori [14]

Answer:

D.  server on the internet

Explanation:

6 0
2 years ago
Which advertising medium has the widest reach on a global front?
lesya [120]

Answer: B

The internet would allow businesses to easily expand globally with the help of social media and the ever expanding resources being poured onto the internet, reaching customers anywhere in the world.

8 0
2 years ago
In object oriented programming, what is another name for the "attributes" of an object?
Ket [755]
I believe the word you're looking for is properties.
7 0
1 year ago
PLEASE HELP PROGRAMMING WILL GIVE BRAINLIEST
JulijaS [17]
The fourth choice is correct.
5 0
2 years ago
Row array gameScores contains all player scores. Construct a row array highScores than contains all player scores greater than m
Sever21 [200]

Answer:

The solution is written using Python as it has a simple syntax.

  1. def getHighScores(gameScores, minScore):
  2.    meetsThreshold = []
  3.    for score in gameScores:
  4.        if(score > minScore):
  5.            meetsThreshold.append(score)
  6.    return meetsThreshold
  7. gameScores = [2, 5, 7, 6, 1, 9, 1]
  8. minScore = 5
  9. highScores = getHighScores(gameScores, minScore)
  10. print(highScores)

Explanation:

Line 1-8

  • Create a function and name it as <em>getHighScores</em> which accepts two values, <em>gameScores</em> and <em>minScore</em>. (Line 1)
  • Create an empty list/array and assign it to variable <em>meetsThreshold</em>. (Line 2)
  • Create a for loop to iterate through each of the score in the <em>gameScores</em> (Line 4)
  • Set a condition if the current score is bigger than the <em>minScore</em>, add the score into the <em>meetsThreshold</em> list (Line 5-6)
  • Return <em>meetsThreshold</em> list as the output

Line 11-12

  • create a random list of <em>gameScores</em> (Line 11)
  • Set the minimum score to 5 (Line 12)

Line 13-14

  • Call the function <em>getHighScores()</em> and pass the<em> gameScores</em> and <em>minScore </em>as the arguments. The codes within the function <em>getHighScores()</em>  will run and return the <em>meetsThreshold </em>list and assign it to <em>highScores.</em> (Line 13)
  • Display <em>highScores</em> using built-in function print().
8 0
1 year ago
Other questions:
  • The alternative to encapsulating security protocol (esp) is _________.
    10·1 answer
  • Someone else can drive your car if _____.
    12·2 answers
  • Software as a Service (SaaS) refers to the use of computing resources, including software and data storage, on the Internet rath
    13·1 answer
  • Our new catalog contains an eclectic collection of items
    6·1 answer
  • Server farms such as Google and Yahoo! provide enough compute capacity for the highest request rate of the day. Imagine that mos
    12·1 answer
  • Write a loop that continually asks the user what pets the user has, until the user enters "rock", in which case the loop ends. I
    12·1 answer
  • Krista needs to configure the default paste options in PowerPoint 2016. Which area of the Options dialog box will she need to us
    14·1 answer
  • Write a method named removeDuplicates that accepts a string parameter and returns a new string with all consecutive occurrences
    7·1 answer
  • Accenture has put together a coalition of several ecosystem partners to implement the principles of blockchain and Multi-party S
    5·1 answer
  • there is a structure called employee that holds information like employee code, name, date of joining. Write a program to create
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!