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: 75% (8 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...
-
True or false: (a) CMOS power drain increases with operating frequency. (b) Unused CMOS inputs can be left unconnected. (c) TTL is better suited than CMOS for operation in high-noise environments....
-
The U.S. government now lists 1,879 endangered or threatened species of animals and plants. The census. Go to the Web site for the U.S. Census Bureau and learn about the census conducted every 10...
-
Laymon Boat Company's bank statement for the month of September showed a balance per bank of $7,000. The company's Cash account in the general ledger had a balance of $5,459 at September 30. Other...
-
There is an increase in the quantity of gasoline exchanged in the market, but the price remains the same. What must have happened to supply and demand?
-
1. Outline the decision-making process for each of the Sanchez familys bicycle purchases. 2. Compare the different purchase processes for the three bikes. What stimulated each of them? What factors...
-
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...
-
DJ LeMahieu of the Colorado Rockies had the highest batting average in the 2016 Major League Baseball season. His average was .348. So assume the probability of getting a hit is .348 for each time he...
-
In a construction 3D printing project, we use a gantry printer with a printing speed of 120mm/s. The nozzle traveling distance (including the openings) per layer is 72 meters, and the height of the...
-
Country of jurisdiction is Australia. Q3. The Good Girls Ltd (TGGs) manufactures high-end women's fashion products and directly sells to customers on the market. For the FBT year ending 31 March...
-
Provide an detailed overview on the topic indirect pay/benefits. Use the information given: Indirect Pay: any type of employer-provided reward (or "benefit") that serves an employee need but is not...
-
A proton approaches the Earth with speed 0 . 0 5 c ( c is the speed of light in vacuum ) at an angle of ' = 4 0 to Earth s magnetic field lines and is trapped in the lower Van Allen belt without a...
-
Howard Ltd. (HL), an app developer, has a new game called Panda World that allows players to choose an avatar panda and travel through an imaginary world. A player can download the game for $10.99...
-
True Tab Inc. produces a small and large version of its popular electronic scale. The anticipated unit sales for the scales by sales region are as follows: The finished goods inventory estimated for...
-
Write a while loop that uses an explicit iterator to accomplish the same thing as Exercise 7.3. Exercise 7.3. Write a for-each loop that calls the addInterest method on each BankAccount object in a...
-
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...
-
Your boss is considering a 5-year investment project. If the project is accepted, it would require an immediate spending of $650 to buy all necessary production equipment. This equipment would be...
-
What role does language diversity play in shaping cultural identities and communication patterns?
-
In order to encourage employee ownership of the company's $1 par common shares, Washington Distribution permits any of its employees to buy shares directly from the company through payroll deduction....
Study smarter with the SolutionInn App