Assume: double soldYesterday, soldToday; int salesTrend; Write an if/else 2 statemente that compares 2 the valuee of the variables e soldYesterday and soldToday, and based e upon that comparison assigns e salesTrend the value 2 -1 or 1. -1 represents the case where soldYesterday is greatere than e soldToday; 1 represents the case where soldYesterday is not greater e than e soldToday.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter5: Making Decisions
Section: Chapter Questions
Problem 19RQ
icon
Related questions
Question

I want the answer using c++, please

Assume:
double soldYesterday, soldToday;
int salesTrend;
Write an if/else e statement e that compares e the value e of the variables e
soldYesterday and soldToday, and based e upon that comparison assigns 2 salesTrend the value
2 -1 or 1.
-1 represents the case where soldYesterday is greater than e soldToday; 1 represents the case
where soldYesterday is not greater e than e soldToday.
Transcribed Image Text:Assume: double soldYesterday, soldToday; int salesTrend; Write an if/else e statement e that compares e the value e of the variables e soldYesterday and soldToday, and based e upon that comparison assigns 2 salesTrend the value 2 -1 or 1. -1 represents the case where soldYesterday is greater than e soldToday; 1 represents the case where soldYesterday is not greater e than e soldToday.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Structured English
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT