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
Which of the following can be managed using Active Directory Users and Computers snap-in?
Goryan [66]

Answer:

The answer is "Option b".

Explanation:

The active directory can manage the data with active directory customers but a snap-on machine. It is used in scrolling the list, as the earlier replies demonstrate. It will appear on the screen if there is no other startup software installed on a computer.  

This snap-on desktop is only a component, that allows its simultaneous use of different systems or devices on the very same system. It also turns the objects more or less into the pieces of the whole.

7 0
1 year ago
Please help, Tech class!!
IRISSAK [1]

Answer:

Explanation:

1=A

2=A

3=A

4=True

5=A

6=D

7=D

8=B

9=True

10=C

3 0
1 year ago
Kendall receives an email stating that a leading computer company is giving away free computers, asking her to forward the email
gavmur [86]

Explanation:

Kendall should report the email as scam and delete email instead of forwarding it. She should also run her virus protection software as these kind of emails on the Internet are mostly Fraud and can contain virus so the user should avoid them.

8 0
2 years ago
This program will store roster and rating information for a soccer team. Coaches rate players during tryouts to ensure a balance
aleksandr82 [10.1K]

Answer:

Question Options :

(1) Prompt the user to input five pairs of numbers: A player’s jersey number (0 – 99) and the player’s rating (1 – 9). Store the jersey numbers in one int array and the ratings in another int array. Output these array(i.e., output the roster).

(2) Implement a menu of options for a user to modify the roster. Each option is represented by a single character. The program initially outputs the menu, and outputs the menu after a user chooses an option. The program ends when the user chooses the option to Quit. For this step, the other options do nothing. (2 pt)

(3) Implement the “Output roster” menu option. (1 pt)

(4) Implement the “Add player” menu option. Prompt the user for a new player’s jersey number and rating. Append the values to the two arrays. (1 pt)

(5) Implement the “Delete player” menu option. Prompt the user for a player’s jersey number. Remove the player from the roster (delete the jersey number and rating). (2 pts)

(6) Implement the “Update player rating” menu option. Prompt the user for a player’s jersey number. Prompt again for a new rating for the player, and then change that player’s rating. (1 pt)

(7) Implement the “Output players above a rating” menu option. Prompt the user for a rating. Print the jersey number and rating for all players with ratings above the entered value. (2 pts)

/******************************************************************************

This program will store roster and rating information for a soccer team.

                             

*******************************************************************************/

#include <iostream>

#include <vector>

using namespace std;

int main() {

   vector< int> jerseyNumber;

   vector< int> rating;

   int temp;

   for (int i = 1; i <= 5; i++) {

       cout << "\nEnter player " << i << "'s jersey number: ";

       cin >> temp;

       if ((temp >= 0) && (temp <= 99)){

           jerseyNumber.push_back(temp);}

       cout << "Enter player " << i << "'s rating: ";

       cin >> temp;

       if ((temp >= 0) && (temp <= 9)){

       rating.push_back(temp);}

       cout << endl;

   } cout << endl;

   cout << "ROSTER" << endl;

   for (int i = 0; i < 5; i++)

cout << "Player " << i + 1 << " -- " << "Jersey number: " << jerseyNumber.at(i) << ", Rating: " << rating.at(i) << endl;

   char option;

   while (true) {

       cout << endl;

       cout << "MENU" << endl;

       cout << "a - Add player" << endl;

       cout << "d - Remove player" << endl;

       cout << "u - Update player rating" << endl;

       cout << "r - Output players above a rating" << endl;

       cout << "o - Output roster" << endl;

       cout << "q - Quit" << endl << endl;

       cout << "Choose an option: " << endl;

       cin >> option;

       switch (option) {

           case 'a':

           case 'A':

               cout << "Enter another player's jersey number: " << endl;

               cin >> temp;

               if ((temp >= 0) && (temp <= 99)){

                   jerseyNumber.push_back(temp);}

               cout << "Enter another player's rating: " << endl;

               cin >> temp;

               if ((temp >= 0) && (temp <= 9)){

                   rating.push_back(temp);}

               break;

           case 'd':

           case 'D':

               cout << "Enter a jersey number: ";

               cin >> temp;

               for (int i = 0; i < jerseyNumber.size(); i++) {

                   if (jerseyNumber.at(i) == temp) {

                       jerseyNumber.erase(jerseyNumber.begin() + i);

                       rating.erase(rating.begin() + i);

                       break; }

               } break;

           case 'u':

           case 'U':

               cout << "Enter a jersey number: ";

               cin >> temp;

               for (int i = 0; i < jerseyNumber.size(); i++) {

                   if (jerseyNumber.at(i) == temp) {

                       cout << "Enter a new rating " << "for player: ";

                       cin >> temp;

                       rating.at(i) = temp;

                       break; }

               } break;

           case 'r':

           case 'R':

               cout << "Enter a rating: ";

               cin >> temp;

               cout << "\nABOVE " << temp << endl;

               for (int i = 0; i < jerseyNumber.size(); i++)

                   if (rating.at(i) > temp)

               cout << "Player " << i + 1 << " -- " << "Jersey number: " << jerseyNumber.at(i)

               << ", Rating: " << rating.at(i) << endl;

               break;

           case 'o':

           case 'O':

               cout << "ROSTER" << endl;

               for (int i = 0; i < jerseyNumber.size(); i++)

               cout << "Player " << i + 1 << " -- " << "Jersey number: " << jerseyNumber.at(i)

               << ", Rating: " << rating.at(i) << endl;

               break;

           case 'q':

               return 0;

               default: cout << "Invalid menu option." << " Try again." << endl;

       }

     }

   }

Explanation:

6 0
1 year ago
Write a single statement that will print the message "first is " followed by the value of first, and then a space, followed by "
nadezda [96]

Answer:

print("first is "+str(first)+" second = "+str(second))

Explanation:

The above written print statement is in python language.If first and second are strings then we need not to use str then we only have to write variable name.This statement prints the given in one line according to the question and it goes to new line after printing.

8 0
1 year ago
Other questions:
  • Whoever helps me with these questions i will help them with the same number of questions in any subject: 1. As the operations ma
    14·1 answer
  • A patient asks her doctor to send a copy of her records to another medical office. However, the records are not transmitted beca
    10·2 answers
  • What are the two main functions of user accounts in Active Directory? (Choose all that apply.) Allow users to access resources m
    7·2 answers
  • Kayle is building a web form. He has included space where users can input their phone numbers and email addresses. However, he w
    15·1 answer
  • In mathematics, the notation n! represents the factorial of the nonnegative integer n. The factorial of n is the product of all
    7·1 answer
  • Matt is a senior developer for Cyber Protect, a company that helps secure management information systems. Matt's new task is to
    8·1 answer
  • Print "userNum1 is negative." if userNum1 is less than O. End with newline Convert userNum2 to 0 if userNum2 is greater than 8.
    10·1 answer
  • Write a client program that writes a struct with a privateFIFO name (call it FIFO_XXXX, where XXXX is the pid that you got from
    11·1 answer
  • Information is stored on a compact disk in a coded pattern of tiny pits arranged in a track that spirals outward toward the rim
    6·1 answer
  • 2. BIOS is contained in ROM and not in RAM. Can you guess why?​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!