Write a for loop that prints the values 1 2 4 8 16 32 64 by increasing
Question:
Write a for loop that prints the values 1 2 4 8 16 32 64 by increasing the value of a counting variable by a factor of two in each cycle.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 66% (6 reviews)
int a 1 for int i1 i 10 i Systemoutprintlna if i2 0 a else a loop will decrement t...View the full answer
Answered By
Brian Otieno
I'm Brian , an experienced professional freelancer with countless hours of success in freelancing many subjects in different disciplines. Specifically, I have handled many subjects and excelled in many disciplines. I have worked on many Computer Science projects and have been able to achieve a lot in that field. Additionally, I have handled other disciplines like History, Humanities, Social Sciences, Political science, Health care and life science, and Religion / Theology. My experience generally in these subjects has made me able to deliver high-quality projects in a very timely fashion. I am very reliable at my job and will get the work done in time, no matter what. In Addition, I have managed to ensure that the work meets my client's expectations and does not cause an error. I am a hard-working and diligent person who is highly responsible for everything I do. Generally, Freelancing has made me more accountable for doing my job. Additionally, I have had a passion for writing for the last seven years in this field.
0.00
0 Reviews
10+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
Write a for loop that displays your name 10 times.
-
Write a for loop that displays every fifth number, zero through 100.
-
Write a nested for loop that prints the following output: 2 4 2 8. 1. 4 4 2 4 8. 8 16 16 16 8 16 32 32 4 4 . 8 16 32 64 4 2 16 32 64 8. 2 4 16 32 64 128 16 8 1. 4
-
Calculate the binding energy per nucleon for a 14/7N nucleus.
-
The government of Zwill presently encourages investment in the country. Comstock International Mining Corporation, a US company, is planning to open a new copper mine in Zwill. The front-end...
-
Find the vertex, focus, and directrix of the parabola and sketch its graph. (y - 2) 2 = 2x + 1
-
Problem 8 is the same as problem 7 with respect to initial measurement of the ARO liability. Now assume that Tadpoles credit standing improves over time, causing the credit-adjusted risk-free rate to...
-
The following are selected 2014 transactions of Yosuke Corporation. Jan. 1 Purchased a small company and recorded goodwill of $150,000. Its useful life is indefinite. May 1 Purchased for $84,000 a...
-
DATABASE SYSTEMS What is a key and how is it important in a relational model?
-
What is the comparative negligence defense? When can it shield auditors from legal liability for their actions?
-
Do Programming Exercise 5 but use a two-dimensional array to store input for 3 years of monthly sales. Report the total sales for each individual year and for the combined years.
-
You sell the book C++ for Fools. Write a program that has you enter a years worth of monthly sales (in terms of number of books, not of money).The program should use a loop to prompt you by month,...
-
On January 1, 2019, Canglon, Inc., issues 10%, 5-year bonds with a face value of $150,000 when the effective rate is 12%. Interest is to be paid semiannually on June 30 and December 31. Prepare...
-
The performance reporting that my current organization utilized is Variance Analysis for Direct Materials and Direct labor. This is because we are a manufacturer which means we manufacture our own...
-
when two different gases A and B of volume VA and VB and with N and NB molecules respectively are mixed together at constant temperature T to form a volume VA+VB there is an increase in the total...
-
What are opportunities to current climate of digital trade in ASEAN? How are succesfull ASEAN Companies?
-
How we define biases and heuristics? What is their implication in terms of rationality assumption? Are heuristics always result with suboptimal choices? What is the relation between heuristics and...
-
Briefly describe five opportunities for continued growth during the next five years for Zara's parent, Inditex.
-
The USA consumed about 21 MMbd (million barrels per day) of crude oil (density 0.82 kg/L, heating value 47 MJ/kg), 67% of which is utilized in the transportation sector. Determine how many barrels of...
-
Find the equation of the plane passing through the points P 5,4,3 ,Q 4,3,1 and R 1,5,4
-
Repeat Problem 2.37 for the function f (x 1 , . . . , x 4 ) = (0, 1, 2, 4, 5, 7, 8, 9, 10, 12, 14, 15). Data From Problem 2.37 Find the minimum-cost SOP and POS forms for the function f (x 1 , x 2 ,...
-
Design the simplest circuit that has four inputs, x 1 , x 2 , x 3 , and x 4 , which produces an output value of 1 whenever three or more of the input variables have the value 1; otherwise, the output...
-
Design the simplest circuit that has three inputs, x 1 , x 2 , and x 3 , which produces an output value of 1 whenever exactly one or two of the input variables have the value 1; otherwise, the output...
-
3. Get into DEBUG and enter the following assembly language instructions using the A command: mov ax, -10 mov bh, -33 mov bl -16 nop Run the program using the T command. Notice the value placed in...
-
What accounting problems result from the reissuance by a subsidiary of parent company bonds that had been acquired in the open market by the subsidiary? Solve Explain. Intercompany profits (gains) or...
-
(a) (5 pts) There is a red & black tree in Fig. 2. The value on each node is its key value. The color of each node can be inferred by its color and shape (rectangles represent black 1 nodes and...
Study smarter with the SolutionInn App