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
lapo4ka [179]
3 years ago
15

Write an if/else statement that compares the value of the variables soldYesterday and soldToday, and based upon that comparison

assigns salesTrend the value -1 or 1. -1 represents the case where soldYesterday is greater than soldToday; 1 represents the case where soldYesterday is not greater than soldToday.
Computers and Technology
1 answer:
jenyasd209 [6]3 years ago
7 0

Answer:

if(soldYesterday > soldToday){

salesTrend = -1;

} else if(soldToday > soldYesterday){

salesTrend = 1;

}

Explanation:

The if/else statement is more explicit. The first if condition check if soldYesterday is greater than soldToday, if true, then -1 is assigned to salesTrend.

Else if soldToday is greater than soldYesterday, if true, then 1 is assigned to salesTrend.

You might be interested in
Which of these is system software? Check all
Darya [45]

Answer:

Windows OS is software....

6 0
3 years ago
JAVA Code:
Burka [1]
Dear ,you should ask it on stackoverflow and geekforgeelks , not here
6 0
4 years ago
Caden, Jacob, Lucas, and Michael, whose last names are Armstrong, Boothe, Gardner, and Robinson, live in four houses in a row.
Anit [1.1K]

Answer:

Jacob Gardner - Lucas Robinson - Caden Boothe - Michael Armstrong

Explanation:

According to clue 4, Lucas's house is not the first, and he has a house on his right, so it can only be house 2 or house 3. Therefore, Caden's house (which is on the right right of Lucas's), it can only be house 3 or house 4.

In turn, track 1 says that Michael's house is not next to Lucas's, so it can be 1 (if Lucas's house is 3) or 4 (if Lucas's house is in 2).

Track 2 says that there is a house before Michael's, which eliminates the possibility that Michael's house is number 1 (there would be no previous house). Thus, in addition, Lucas's house turns out to be 2 (Michael's house is not next door) and Caden's is 3, while Jacon's is house 1.

Jacob - Lucas - Caden - Michael

In turn, regarding surnames, clue 2 says that Robinson's house is after Gardner's and before Michael's. Thus, Robinson can be the last name of Jacob or Lucas, and Gardner that of Lucas or Caden. Now, since Boothe's house is just before Armstrong's, the order would be as follows:

Jacob Gardner - Lucas Robinson - Caden Boothe - Michael Armstrong

4 0
3 years ago
Where can I watch all harry potter movies for free?
Ira Lisetskai [31]

Answer:

Ive streamed them before on DailyMotion

5 0
3 years ago
Much like the SysV init daemon, the Systemd init daemon is used to start daemons during system initialization as well as start a
Alexxx [7]

Answer:

True

Explanation:

Closely related to the init daemon, the systemd is a daemon in itself that is directly or indirectly  responsible for other deamons. it start other daemons during system boots up as well as start and  stip them after booting. it is also the first and last daemon during system processes.

3 0
3 years ago
Other questions:
  • Print either "Fruit", "Drink", or "Unknown" (followed by a newline) depending on the value of userItem. Print "Unknown" (followe
    15·1 answer
  • Why should the data in a reservation system that is constantly being updated be stored on a magnetic disk instead of a CD or DVD
    15·1 answer
  • In a process called _____, excel continually reviews the workbook for errors in formulas as you create or manipulate it.
    13·1 answer
  • what aspect should you consider before adding pictures to a document? you should structure the first before you search for a rel
    15·2 answers
  • What is looping in QBASIC​
    9·1 answer
  • Who all likes fortnite
    15·2 answers
  • How should a Salesforce Admin fulfill those requirements? Universal Containers launches a Partner Community for their resellers
    13·1 answer
  • Which line of code in this program is MOST likely to result in an error
    15·2 answers
  • Write an algorithm of telephone call system​
    10·2 answers
  • Consider the following statement: String myMiddleInitial = “h”;
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!