Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1- Write an if/else statement that compares the value of the variables soldYeste

ID: 3584737 • Letter: 1

Question

1- 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 . 2-Given two integer variables matricAge and gradAge , write a statement that gives gradAge a value that is 4 more than the value of matricAge . 3-Write a single statement that declares a reference variable of type Integer named myInt , creates an object of type Integer with the initial value of 75 , and assigns it to the reference variable.

Explanation / Answer

assign -1 to variable "salesTrend" if "soldYesterday">"soldToday" or else assign 1 to "salesTrend" Heres the program: #include using namespace std; int main() { int soldToday; int soldYesterday; int salesTrend; cout