Chapter 3: Problem 12
Assume that qty and salesReps are both integers. Use a type cast expression to rewrite the following statement so it will no longer perform integer division. unitsEach = qty / salesReps:
Chapter 3: Problem 12
Assume that qty and salesReps are both integers. Use a type cast expression to rewrite the following statement so it will no longer perform integer division. unitsEach = qty / salesReps:
All the tools & learning materials you need for study success - in one app.
Get started for freeLittle Italy Pizza charges 12.00 for a \(12^{\text {" diameter sausage }}\) pirza and \(\$ 14.00\) for a \(14^{\prime \prime}\) diameter sausage pizza. Write the pseudocode algorithm that calculates and displays how much each of these earns the establishment per square inch of pizza sold. (Hint: you will need to first calculate how many square inches there are in each pizza.)
Complete the following table by writing the value of each expression in the Value column. \begin{array}{l} 28 \quad 4-2 \\ 6+12 * 2-8 \\ 4+8=2 \\ 6+1783-2 \\ 2+22 *(9-7) \\ (8+7) * 2 \\ (16+7) \text { \& } 2-1 \\ 12 \quad /(10-6) \\ (19-3) *(2+2) / 4 \end{array}
Pet World offers a \(15 \%\) discount to senior citizens, Write a pseudocode algorithm for a program that inputs the amount of a sale, then calculates and displays both the amount the customer saves and the amount they must pay.
Assume a program has the following variable definitions Int units: float mass: double welght: and the following statement: \\[ \text { weight }=\operatorname{mas} s \cdot \text { units: } \\] Which automatic data type conversions will take place?
Assume a string object has been defined as follows: string description: A) Write a cin statement that reads in a one word description. B) Write a statement that reads in a description that can contain multiple words separated by blanks.
What do you think about this solution?
We value your feedback to improve our textbook solutions.