What are the values of the following expressions, assuming that n and m have type int, n
Question:
What are the values of the following expressions, assuming that n and m have type int,
n is 17, and m is 18?
a. n / 10 + n % 10
b. n % 2 + m % 2
c. (m + n) / 2
d. (m + n) / 2.0
e. (int) (0.5 * (m + n))
f. (int) Math.round(0.5 * (m + n))
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 66% (6 reviews)
Given n 17 m 18 n 10 n 10 17 10 17 10 1 17 10 1 7 8 ...View the full answer
Answered By
Antony Mutonga
I am a professional educator and writer with exceptional skills in assisting bloggers and other specializations that necessitate a fantastic writer. One of the most significant parts of being the best is that I have provided excellent service to a large number of clients. With my exceptional abilities, I have amassed a large number of references, allowing me to continue working as a respected and admired writer. As a skilled content writer, I am also a reputable IT writer with the necessary talents to turn papers into exceptional results.
4.50+
2+ Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
What are the values of the following expressions? In each line, assume that double x = 2.5; double y = -1.5; int m = 18; int n = 4; a. x + n * y - (x + n) * y b. m / n + m % n c. 5 * x - n / 5 d. 1 -...
-
What are the values of (a) 12 8, (b) 35 / (7), (c) (24 8) (4 + 5), (d) (18 4) / (3 + 9 5), (e) (22/11) (18 + 3) / (12/4)?
-
What are the values of the following expressions? In each line, assume that String s = "Hello"; String t = "World"; a. s.length() + t.length() b. s.substring(1, 2) c. s.substring(s.length() / 2,...
-
On the income statement for the year ending December 31, Y1, the accountant for ABC calculated operating income before taxes of $300,000. This $300,000 did not include the effect of any of the...
-
The auditor for a large corporation routinely monitors cash disbursements. As part of this process, the auditor examines check request forms to determine whether they have been properly approved....
-
As a woman walks, her entire weight is momentarily placed on one heel of her high-heeled shoes. Calculate the pressure exerted on the floor by the heel if it has an area of 1.50cm 2 and the womans...
-
Using carbon dating, one sample of wood is found to be twice as old as another, because the first sample is found to be 200 years old while the other sample is 100 years old. Determine whether the...
-
At September 30, 2014, the accounts of Mountain Terrace Medical Center (MTMC) include the following: Accounts Receivable .............$ 145,000 Allowance for Bad Debts (credit balance) .... 3,500...
-
Describe the stages a 22-year-old university student would go though when purchasing a new computer. Also, describe the process the same individual would go through when purchasing a frozen pizza.
-
The dotplot generated below by the One Proportion applet assumed the long-run proportion of winning was equal to 50%. Use this dotplot to answer the following questions. a. How many dots are in the...
-
Giving change. Implement a program that directs a cashier how to give change. The program has two inputs: the amount due and the amount received from the customer. Display the dollars, quarters,...
-
Write a program that prompts the user for a radius and then prints The area and circumference of a circle with that radius The volume and surface area of a sphere with that radius
-
(a) Figure 4-12 shows the block diagram for a 32-bit serial adder with accumulator. The control circuit uses a 5-bit counter, which outputs a signal K = 1 when it is in state 11111. When a start...
-
Consumer surplus is the area found _ _ _ _ _ _ _ _ _ _ _ _ _ market price and _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ the demand curve. Select the correct answer below: above; below below; above below, below...
-
Hise Bikes manufactures three types of bike tires: the Pro, the Velo Road and the Diamond Back. Projected sales for the next period are 25000 Pro tires, 25000 Velo Road tires and 30000 Diamond Back...
-
Explain and evaluate a policy initiative grounded in behavioural economics that you are familiar with. Explain ( i ) the concept of choice architecture, ( ii ) the issue or problem, ( iii ) the...
-
You hold a ruler that has a charge on its tip 2.00 cm above a small piece of tissue paper to see if it can be picked up. The ruler has -12.0 C of charge. The tissue has 3.00 g of mass. What is the...
-
Under certain circumstances, potassium ions (K+) in a cell will move across the cell membrane from the inside to the outside. The potential inside the cell is -85.5 mV and the potential outside the...
-
If a 2 Ã 2 matrix is multiplied on the left by the given matrices, what elementary row operation is performed on that matrix? (a) (b) (c) 0 01 9
-
From a medical tourist perspective, compare Shouldice with the traditional hospital in terms of the key factors of competition. Using Table 15-3, why would Shouldice attract patients from outside the...
-
When silicon chips are fabricated, defects in materials (e.g., silicon) and manufacturing errors can result in defective circuits. A very common defect is for one wire to affect the signal in...
-
In this exercise, we examine how pipelining affects the clock cycle time of the processor. Problems in this exercise assume that individual stages of the datapath have the following latencies: Also,...
-
In this exercise, we examine how data dependences affect execution in the basic 5-stage pipeline described in Section 4.5. Problems in this exercise refer to the following sequence of instructions:...
-
An agency increased its monthly expenditures by 25% from January 2009 to January 2010. During January 2010, the agency's monthly expenditures totaled $2,050. During February 2010, monthly...
-
On January 1, 2022, Teton Corporation had retained earnings of $11,420,000. During 2022, Teton reported net income of $2,155,000, declared dividends of $755,000, and issued common stock for...
-
Macron Corporation manufactures two productsLaptops and Tablets. The monthly production and sales of Laptops is 1,800 units, while 8,000 units of Tablets are produced and sold. The company has...
Study smarter with the SolutionInn App