What do these loops print? a. for (int i = 1; i < 10; i++) { System.out.print(i
Question:
What do these loops print?
a. for (int i = 1; i < 10; i++) { System.out.print(i + " "); }
b. for (int i = 1; i < 10; i += 2) { System.out.print(i + " "); }
c. for (int i = 10; i > 1; i--) { System.out.print(i + " "); }
d. for (int i = 0; i < 10; i++) { System.out.print(i + " "); }
e. for (int i = 1; i < 10; i = i * 2) { System.out.print(i + " "); }
f. for (int i = 1; i < 10; i++) { if (i % 2 == 0) { System.out.print(i + " "); } }
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 66% (9 reviews)
a for int i 1 i 10 i Systemoutprinti loop start from i 1 and should run less than 10 ie up to 9 and ...View the full answer
Answered By
Marvine Ekina
Marvine Ekina
Dedicated and experienced Academic Tutor with a proven track record for helping students to improve their academic performance. Adept at evaluating students and creating learning plans based on their strengths and weaknesses. Bringing forth a devotion to education and helping others to achieve their academic and life goals.
PERSONAL INFORMATION
Address: , ,
Nationality:
Driving License:
Hobbies: reading
SKILLS
????? Problem Solving Skills
????? Predictive Modeling
????? Customer Service Skills
????? Creative Problem Solving Skills
????? Strong Analytical Skills
????? Project Management Skills
????? Multitasking Skills
????? Leadership Skills
????? Curriculum Development
????? Excellent Communication Skills
????? SAT Prep
????? Knowledge of Educational Philosophies
????? Informal and Formal Assessments
0.00
0 Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
What do these loops print? a. int i = 0; int j = 10; while (i < j) { System.out.println(i + " " + j); i++; j--; } b. int i = 0; int j = 10; while (i < j) { System.out.println(i + j); i++; j++; }
-
Q3. Show the return value of main through register inspection Q4. Issue the following commands: (gdb) list swap_n_add (gdb) disas swap_n_add Group the assembly code instructions with their...
-
Before you read the specifics of this assignment I want to emphasize that you need to start working on it immediately. It is very tempting to put off an assignment that is not due until Week 3 of the...
-
Do women lead differently than men?
-
Recall from Exercise 6.32 that yearly returns on common stocks are normally distributed with a mean of 12.4 percent and a standard deviation of 20.6 percent. a. What percentage of yearly returns are...
-
Drabinski Ltd. decided on 1 July 20X3 to dispose of an asset group consisting of land, a building, and equipment. An active plan of disposal is being carried out, and sale is highly probable within...
-
What are the attributes of a project? AppendixLO1
-
Trowbridge Manufacturing produces cases for personal computers and other electronic equipment. The quality control inspector for this company believes that a particular process is out of control....
-
A ratio that is related to the receivables turnover ratio is the Select one: bad debts ratio. days sales in inventory ratio. average collection period. inventory turnover ratio.
-
Your client, Leona Ledford, was personally served with a summons and complaint on October 23 in the case of Masters v Ledford Her answer is due in 30 days. You will mail the answer to the court. What...
-
Translate the following pseudocode for finding the minimum value from a set of inputs into a Java program. Set a Boolean variable "first" to true. If the scanner has more numbers Read the next value....
-
Translate the following pseudocode for randomly permuting the characters in a string into a Java program. Read a word. Repeat word.length() times Pick a random position i in the word, but not the...
-
Annual expenses for two alternatives have been estimated on different bases as follows: If the average general price inflation rate is expected to be 4% per year and the real rate of interest is 8%...
-
Part 2 One Stop Electrical Shop are merchandisers of household fixtures & fittings. The business began the last quarter of 2020 (October to December) with 25 Starburst Wall Clocks at a total cost of...
-
A species of butterfly has three subspecies A, B, and C. A scientist is trying to classify observed. specimens into these subspecies based on the color of their wings, which can be blue, green, pink,...
-
Stock during the year were sold for $8 per share. On December 31 , Portland had no remaining treasury stock. Required: Prepare the necessary journal entries to record any transactions associated with...
-
2) 20 pts. A 2-kg block rests on a wedge that has a coefficient of friction between the wedge and block of 0.3. The system accelerated to the right. Determine the maximum acceleration of the system...
-
ABC Ltd. is concerning about its poor performance and considering whether or not dropping the production and sells of product R, which incurs losses of Birr 4000. Additional information: The salaries...
-
Larry is the sole proprietor of a trampoline shop. During 2018, the following transactions occurred: Unimproved land adjacent to the store was condemned by the city on February 1. The condemnation...
-
Reread the discussion leading to the result given in (7). Does the matrix sI - A always have an inverse? Discuss.
-
What is the Nyquist sampling rate for each of the following signals? a. A low-pass signal with bandwidth of 200 KHz? b. A band-pass signal with bandwidth of 200 KHz if the lowest frequency is 100 KHz?
-
What is the result of scrambling the sequence 11100000000000 using each of the following scrambling techniques? Assume that the last non-zero signal level has been positive. a. B8ZS b. HDB3 (The...
-
The input stream to a 4B/5B block encoder is 0100 0000 0000 0000 0000 0001 Answer the following questions: a. What is the output stream? b. What is the length of the longest consecutive sequence of...
-
X Your answer is incorrect. Flounder Consulting Corp. company records revealed the following for the current year: What was the net cash flow from operating activities for the year? $ 0 $ 9 8 0 0...
-
Assume that interest rate parity holds. The U.S. fiveyear interest rate is 0.08 annualized, and the Mexican fiveyear interest rate is 0.05 annualized. Todays spot rate of the Mexican peso is $0.21....
-
find the NSP of a whole life insurance.6 with $100,000 Death benefits, for a female aged 105 years, if i=10%? (use Australian life Tables 2005-07) find the NSP of a whole life insurance.6 with...
Study smarter with the SolutionInn App