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.
.
.
Click on the title for the solution
.
.
if (soldYesterday>soldToday) salesTrend=-1;
else salesTrend=1;
.
Click on the title for the solution
.
.
This is the answer:
:
if (soldYesterday>soldToday) salesTrend=-1;
else salesTrend=1;
Comments
Post a Comment