subject
Mathematics, 05.11.2019 02:31 rostecorralmart

Write a method called printpowersof2 that accepts a maximum number as an argument and prints each power of 2 from 20 (1) up to that maximum power, inclusive. for example, consider the following calls: printpowersof2(3); printpowersof2(10); these calls should produce the following output: 1 2 4 8 1 2 4 8 16 32 64 128 256 512 1024 you may assume that the value passed to printpowersof2 is 0 or greater. (the math class may you with this problem. if you use it, you may need to cast its results from double to int so that you don't see a .0 after each number in your output. also, can you write this program without using the math class? )

ansver
Answers: 1

Another question on Mathematics

question
Mathematics, 21.06.2019 12:30
How can you solve an equation with a variable on both sides? complete the explanation. you can solve the equation by using *(blank)* operations to get the variable terms on one side of the equal sign and the constant terms on the *(blank)* side. then *(blank)* both sides by the coefficient of the resulting variable term.
Answers: 2
question
Mathematics, 21.06.2019 13:30
Which function is represented by the graph
Answers: 2
question
Mathematics, 21.06.2019 19:00
When keisha installed a fence along the 200 foot perimeter of her rectangular back yard, she left an opening for a gate.in the diagram below, she used x to represent the length in feet of the gate? what is the value? a. 10 b. 20 c. 25 d. 30
Answers: 1
question
Mathematics, 21.06.2019 23:30
The area (a) of a circle with a radius of r is given by the formula and its diameter (d) is given by d=2r. arrange the equations in the correct sequence to rewrite the formula for diameter in terms of the area of the circle.
Answers: 1
You know the right answer?
Write a method called printpowersof2 that accepts a maximum number as an argument and prints each po...
Questions
Questions on the website: 13722367