Determine the output from the following code segment: int sum; int count; sum 0; count = 1;
Question:
Determine the output from the following code segment:
Transcribed Image Text:
int sum; int count; sum 0; count = 1; while (sum < 10) { } sum sum + count; count++; System.out.println ("sum = System.out.println("count System.out.println("sum System.out.println("count 11 11 + sum); + count); + sum); = + count);
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 100% (1 review)
Answered By
Muhammad Salman Alvi
Well, I am a student of Electrical Engineeing from Information Technology University of Punjab. Just getting into my final year. I have always been good at doing Mathematics, Physics, hardware and technical subjects. Teaching profession requires a alot of responsibilities and challenges.
My teaching experience started as an home tutor a year ago. When I started teaching mathematics and physic subjects to an O Level student. He was about 14 years old. His name was Ibrahim and I used to teach him for about 2 hours daily. Teaching him required a lot of patience but I had to be polite with him. I used to give him a 5 min break after 1 hour session. He was quite weak in basic maths and calculation. He used to do quite a lot of mistakes in his homework which I gave him weekly. So I decided to teach him basics from scratch. He used to say that he got the concept even if he didn't. So I had to ask him again and again. I worked on his basics for a month and after that I started taking a weekly test sesions. After few months he started to improve gradually. Now after teaching him for about a year I can proudly say that he has improved alot. The most important thing was he managed to communicate all the difficullties he was facing. He was quite capable and patient. I had a sincere desire to help him reach to its full potential. So I managed to do that. We had a very good honest relationship of a student and a teacher. I loved teaching him as a tutor. Now having an experience of one year teaching I can read students quite well. I look forward to work as an online tutor who could help students in solving their all sort of difficulties, problems and queries.
4.90+
29+ Reviews
43+ Question Solved
Related Book For
Guide To Java A Concise Introduction To Programming
ISBN: 978-3031228414
2nd Edition
Authors: James T. Streib, Takako Soma
Question Posted:
Students also viewed these Computer science questions
-
Briefly describe ASCII and Unicode and draw attention to any relationship between them. [3 marks] (b) Briefly explain what a Reader is in the context of reading characters from data. [3 marks] A...
-
ttth Suppose that the sequence of bags {Bn | n N} is recursively enumerated by the computable function e(n, x) = fn(x), [7 marks] Hence prove that the set of all recursive bags cannot be recursively...
-
ccn2 java solve them all . . . r2 e1 e2 box r2 Write sound typing and subtyping rules for these constructs. [5 marks] Now suppose that we add to this calculus the type variables and bounded universal...
-
Do you have convincing evidence of sufficient computer skills to engage in online discussion forums, access online library resources, engage in online videoconferencing, and utilize word processing,...
-
A radiant heat lamp is a rod, 0.5 m long and 0.5 cm in diameter, through which 400 W of electric energy is deposited. Assume the surface has an emissivity of 0.9 and neglect incoming radiation. What...
-
In which direction would you expect each of the following equilibria to lie? (a) NH 3 + - OH NH 2 - + H 2 O (b) CH 3 NH 2 + H 2 O CH 3 NH 3 + + - OH (c) CH 3 NH 2 + (CH 3 ) 3 NH + CH 3 NH 3 + +...
-
Spring B is stiffer than spring A. Which one has more energy stored in it if you (a) compress both springs with the same force and \((b)\) compress both springs the same displacement from their...
-
Congress passed the Inventors' Rights Act of 1999 to protect inventors from invention promotion scams. The Act authorized the Patent and Trademark Office (PTO) to publicize complaints it receives...
-
The zaibatsu welcomed outside management expertise and advice. All of these. were successful in raising money in the new stock exchanges to solidify control over subsidiaries. were heavy-industry...
-
Determine the output from the following code segment: int sum = 2; int number = 3; do { sum = sum + number; number++; System.out.println("sum " + sum) ; System.out.println ("number = " + number); }...
-
Identify the syntax errors in the following code segment: int product; product = 1; for (i=1, i
-
To be admissible in court, it must be: a. Real, material, and relevant b. Relevant, immaterial, and competent c. Relevant, material and competent d. Real, material and competent
-
The general term that refers to the tendency of a parcel of air to either remain in place or change its initial position is ________. a. adiabatic b. conditional instability c. stasis d. stability
-
Assume a warm air parcel at Earth's surface has a temperature of 21 degrees C (70 degrees F) and begins to rise upward. Assume it becomes saturated at 1000 m (3300 ft) altitude, and continues to rise...
-
All adiabatic temperature changes occur as a result of a. changes in the absolute humidity of the air. b. expansion or compression of the air. c. changes is specific humidity d. the addition or...
-
Assume an employee signs a non - disparagement clause. What would be considered breaking this clause? a . ) Telling a company's trade secret to a competing firm for a fee b . ) Using a work computer...
-
In order to evaluate lim f(a+h)-f(), it is necessary to evaluate f(a + h). h xa For f(x) = x 3, f(a+h) =
-
Repeat Problem 5-10 using the perpetual system. Bitten Companys inventory records show 600 units on hand on October 1 with a unit cost of $5 each. The following transactions occurred during the month...
-
Complete the equations for the following equilibria and calculate Keq where the Keq expression includes [HO]. Be sure to enter Keq in proper scientific notation. (a) ammonia (acting as a base) reacts...
-
Redo Listing 9.9, replacing the character array with a string object. The program should no longer have to check whether the input string fits, and it can compare the input string to "" to check for...
-
Consider the subtractions 26 27 = 99 and 18 34 = 84. Using the concepts presented in Section 3.3.4, explain how these answers (99 and 84) can be interpreted as the correct signed results of these...
-
Design a ternary full-adder circuit, using the approach described in Problem 3.25. Data From Problem 3.25 In a ternary number system there are three digits: 0, 1, and 2. Figure P3.3 defines a ternary...
-
At the end of 20X1, Duncan Corp. overestimated its bad debts by $25,000. Question: What is the effect on Duncan's net income for 20X1, and the effect on its total assets, total liabilities, and total...
-
Alpha Company recently purchased a piece of equipment for $3,000 that will be paid for within 30 days after delivery. At what point will the event be recorded in Alpha's accounting system?
-
Find a minimum cost spanning tree of the following weighted graph. There may be more than one correct graph, but there will be a correct answer for the minimum cost! H 2
Study smarter with the SolutionInn App