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...
-
If an international business firm has separate vice presidents in charge of its Asian, African, and European divisions, it is most likely using a global ____________ structure. (a) product (b)...
-
Which data entry application control would detect and prevent entry of alpha betic characters as the price of an item in the inventory master file? a. field check c. completeness check b. limit check...
-
Identify the types of firm-specific factors that increase a firms nondiversifiable risk (systematic risk). Identify the types of firm-specific factors that increase a firms diversifiable risk...
-
Ariel's grandmother, Mariam, gave her a diamond ring as a gift, which Mariam's husband had given her at the birth of their first child. The original cost of the ring was $3,000. At the time Ariel...
-
The Dorilane Company produces a set of wood patio furniture consisting of a table and four chairs. The company has enough customer demand to justify producing its full capacity of 2,000 sets per...
-
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...
-
The air inside a hot-air balloon has an average temperature of 79.2 C. The outside air has a temperature of 20.3 C. What is the ratio of the density of air in the balloon to the density of air in the...
-
a. What is generalized audit software? b. Explain how generalized audit software can be used in (1) tests of controls and (2) substantive tests.
-
Indicate five characteristics that distinguish computer processing from manual processing.
-
Identify four controls that can aid in preventing or detecting errors or irregularities in recording cash receipts.
-
a. Indicate the purpose of each of the three types of application controls, b. Identify the categories of controls pertaining to the conversion of data.
-
a. What is a lockbox system, and how can it affect control risk for cash receipts transactions? b. What is the meaning of deposited intact daily, and how does this control affect control risk for...
-
Bourque Corporation began operations on January 2. Its year end is December 31, and it adjusts its accounts annually. Selected transactions for the current year follow: 1. On January 2, purchased...
-
$10,000 was borrowed at 3.5% on July 17. The borrower repaid $5000 on August 12, and $2000 on September 18. What final payment is required on November 12 to fully repay the loan?
-
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...
-
Determine the rate of return for the following cash flow series: $22,000 0 1 2 3 4 5 6 7 8 9 10 $6,000 $500 $1,000
-
Currently, 3-year Treasury securities yield 9%, 7-year Treasury securities yield 8.6%, and 10-year Treasury securities yield 8.3%. If the expectations theory is correct, what does the market expect...
-
Region Name: Australia Equity Markets: Discuss Australian equity market performance and outlook based on factors Macroeconomic factors ( GDP growth, inflation ) , Monetary policy settings ( interest...
Study smarter with the SolutionInn App