In the following program segment, which variable is the loop control variable (also known as the counter
Question:
In the following program segment, which variable is the loop control variable (also known as the counter variable) and which is the accumulator?
int a, x = 0, y = 0;
while (x < 10)
{
a = x * 2;
y += a;
x++;
}
System.out.println("The sum is " + y);
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 44% (9 reviews)
The Python for statement iterates over the members of a sequence in order executing the block each ...View the full answer
Answered By
Dudhat Vaidehi
I tutored mostly elementary school students privately after school and during the summer. We met in their homes or at the public library. I charged an hourly fee, and I provided any necessary materials.
Having taught in special education in two local schools for many years meant that I had contact with a lot of parents of special needs students. I never had to advertise — word of mouth was how most folks knew of me. At one point I did have a website, but didn't utilize it much. I stayed very busy, especially in the summers, and always had a full schedule. I typically met with each student's teacher in order to get an idea of what the focus of my instruction/remediation should be. Becoming familiar with the student's learning style(s) was also very helpful. Often parents would share records and test results with me. After each tutoring session, I documented the student’s progress and gave parents written updates, as well as phone calls or emails as needed.
While my students and I certainly utilized technology and the internet often during our sessions, I never tutored online or for any tutoring company, so am not familiar with the curriculums or methods used in those settings.
Tutoring one on one was very enjoyable and rewarding. My students and I had fun, and grew quite fond of one another. The extra income was a bonus. I had to retire from tutoring due to a physically handicapping disease, and miss my students very much.
0.00
0 Reviews
10+ Question Solved
Related Book For
Starting Out With Java From Control Structures Through Data Structures
ISBN: 9780133957051
6th Edition
Authors: Tony Gaddis
Question Posted:
Students also viewed these Computer science questions
-
In the following program segment i, j, m, and n are integer variables. The values of m and n are supplied by the user earlier in the execution of the total program. for i : = 1 to m do for j : = 1 to...
-
In the following program segment, i, j, k, and counter are integer variables. Determine the value that the variable counter will have after the segment is executed. counter : = 10 for i := 1 to 15 do...
-
What will the println statement in the following program segment display? int x = 5; System.out.println(x++); a. 5 b. 6 c. 0 d. None of these
-
How would you help a person understand domestic violence if she was from a culture that considered male dominance and female submission as part of their beliefs?
-
What is the approximate P- value for the following values of X2 and df? a. X2 = 6.62, df = 3 b. X2 = 16.97, df = 10 c. X2 = 30.19, df = 17
-
Using unemployment data provided by the World Bank, investigate the association between the male unemployment rate in 2014 and 2017. a) Find a regression model predicting the 2017 rate from the 2014...
-
On April 20, 1992, Daniel Hubbard (plaintiff), a potato farmer, and UTZ Quality Foods, Inc. (UTZ) (defendant), a potato chip manufacturer, entered an installment contract under which Hubbard agreed...
-
On May 31, 2014, Reber Company had a cash balance per books of $6,781.50. The bank statement from New York State Bank on that date showed a balance of $6,404.60. A comparison of the statement with...
-
2. What is the computational complexity of the following function Mystery1? int Mystery1(int n) { int sum = 0; for (int i=0; i
-
Explain how people professionals create value for people, organisations and wider stakeholders. Divide this answer into three sections: Explain how HR creates value/ makes a difference for: 1. people...
-
Why must the value chosen for use as a sentinel be carefully selected?
-
Write a program that asks the user for the name of a file. The program should display the contents of the file with each line preceded with a line number followed by a colon. The line numbering...
-
Estimate the heat-transfer coefficient for the pool boiling of water at 2.1 bar, from a surface at 125C. Check that the critical flux is not exceeded.
-
Assume that you used the remainder method to convert a given decimal number D to hexadecimal. The following remainders were calculated and are listed in the order that they were calculated, i.e.,...
-
7. Last night Marion won $5000 in a lottery. She was given two options. She can take $5000 today or $X every 6 months (beginning 6 months from now) for 2 years. If the options are equivalent and the...
-
1. Consider the charge distribution shown, for which Q= 3.6C. Find the 1m +Q C a) force on the +2C in millinewtons 2m mN +2MC
-
Consider the following 4-table-join query: USE Northwind; SELECT S.ShipperID ,S.CompanyName ,O.OrderID ,O.ShippedDate ,EMP.EmployeeID ,EMP.LastName ,O.CustomerID ,C.CompanyName FROM Shippers AS S...
-
What is the range of the function f(x) = 3x + 2 over the interval -6 < x < 6?
-
Some operating systems provide a system call rename to give a file a new name. Is there any difference at all between using this call to rename a file and just copying the file to a new file with the...
-
The bookkeeper for Riley, Inc., made the following errors: a. A cash purchase of supplies of $357 was recorded as a debit to Supplies for $375 and a credit to Cash of $375. b. A cash sale of $3,154...
-
This standard library function returns a random floating-point number in the range of 0.0 up to 1.0 (but not including 1.0). a. Random b. Randint c. Random_integer d. Uniform
-
What is a parameter variables scope?
-
What is a parameter variables scope?
-
As part of the financial planning process, what strategies would you propose to finance the nonprofit's mission? What would you recommend to this organization to strengthen its financial condition?
-
What will result in a favorable operating budget variance? A. Room revenue is higher than the same month last year B. Utilities expense is lower than the same month last year C. Maintenance expense...
-
To be covered by Philhealth, a member should: a. must have paid at least three months' premium contributions within the immediate six-month period prior to the first day of confinement b must have...
Study smarter with the SolutionInn App