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...
-
The particles X 0 (1193) and Y (1321) can be produced in the strong interaction processes K + p Ï 0 + X 0 and K + p K + + Y respectively. Deduce the baryon number, strangeness, charm and bottom...
-
Name the five phases in the systems development life cycle, and briefly describe each.
-
In the month of June, Paula's Beauty Salon gave 3,500 haircuts, shampoos, and permanents at an average price of $30. During the month, fixed costs were $16,800 and variable costs were 80% of sales....
-
pleasse help 167 , then do not purse the project 1.92 , then de nat purse the project 1.92, tren parive the project 167 , then punue the profect 220 , then do not purse tre projed
-
Quarterly sales for a department store over a six-year period are given in the file P12_52.xlsx. a. Use multiple regression to develop an equation that can be used to predict future quarterly sales....
-
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,...
-
Let T = {(i, j, k)| i, j, k 2 N}. Show that T is countable.
-
Consider the expression timing is everything in relation to the building of the TOMS brand. Besides the influence of recovering economic conditions and the increased affluence of potential customers,...
-
What is corporate strategy and why is it important? Choose a company with which you are familiar, and evaluate its corporate strategy, especially in regards to financial strategies. What are some...
-
Assignment Tasks: Review the following situations and for each pay period determine the employee's net pay by calculating what earnings & benefits are subject to Income Tax, Canada / Quebec Pension...
-
sample letter for signature change on bank accounts for principals of school
-
Use Excelshowing all work and formulasto complete the following: Prepare a flexible budget. Compute the sales volume variance and the variable cost volume variances based on a comparison between...
-
Express each sum or difference as a product of sines and/or cosine. sin + sin(3)
-
The following information is available for Partin Company: Sales $598,000 Sales Returns and Allowances 20,000 Cost of Goods Sold 398,000 Selling Expense 69,000 Administrative Expense 25,000 Interest...
-
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...
-
Diplomatic Security Service provides Airport Transportation and Surveillance Service to Foreign Diplomats in Guyana. The company has two support departments - Information Systems and Equipment...
-
Q1: A disparity of bargaining power between the parties to a contract may result in unfair terms but a court is not likely to consider the contract unconscionable. Group of answer choices a. True b....
-
Life Tool Manufacturing has a system in place to recall products that prove to be dangerous at some time after manufacture and distribution. This represents which element of the due care theory?...
Study smarter with the SolutionInn App