1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Andrew [12]
3 years ago
15

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 ea

ch cycle.
Computers and Technology
1 answer:
Svetllana [295]3 years ago
3 0

Answer:

Following code is in C++.

#include <iostream>

using namespace std;

int main() {

   int count=1;

   for(int i=1;i<=6;i++)

   {

       count*=2;    //multiplying the count variable.

       cout<<count<<" ";  //printing the variables.

   }

return 0;

}

Output:-

2 4 8 16 32 64

Explanation:

I have initialized a variable count with the value 1 after that I have ran a loop from 1 to 6 and in each iteration in the loop the count variable is multiplied by 2.After that just printing the output.

You might be interested in
The order of precedence determine
Free_Kalibri [48]
The order of precedence is the hierarchical order in which calculations are conducted. The simplest example of this is the way you always multiply before you add numbers.
7 0
4 years ago
What is the relationship between the speed of an object in the amount of energy it has? explain
Varvara68 [4.7K]
Light energy into Chemical energy
6 0
3 years ago
Help with scripting/coding questions!
user100 [1]

Answer:

Explanation:

For the first questions the variable's name is <u>Today,</u> and is declared like a date variable, this will be returned a date value.

For the second question, where the browser will show today's date because with the variable Today, we get the date and with the document.write(Today) is shown the variable information.

With the third question, the result will be "Hello!", because the August is the 8 month, and July the 7, in this case the IF is False and for that will show "Hello!".

5 0
3 years ago
The standard computer keyboard is implemented using_______ A:BCD code B:Gray code C:ASCII code D:reflected code
Tasya [4]

Answer:

C. ASCII code

Explanation:

Reflected code is another term for gray code so you can cross both out.

BCD code is binary decimal code used in scientific and graphic calculators

ASCII code is the only one use in a computer keyboard so I'm guessing that's the answer. :)

6 0
3 years ago
Read 2 more answers
Describe the 3 important segments of a presentation.<br> -Introduction<br> -Body<br> -Conclusion
Oxana [17]

The introduction states what the presentation is about/Talking about.

The body goes into detail and helps support the introduction.

The conclusion brings everything to an end/it wraps everything up

6 0
3 years ago
Other questions:
  • How do say phone in French?
    10·2 answers
  • What is important for an internet user to know about https:// ?
    9·1 answer
  • Women make up 52 percent of the voting-age population and are more likely to vote, yet
    12·2 answers
  • ____________ is a widely accepted international best practices framework for implementing information systems security.
    12·1 answer
  • _____________ data is what is translated to digital format so it can be stored in a computer.
    10·1 answer
  • hen a computer user stored data in computer memory, it required 1,024 bytes. How many KB does this represent?
    8·1 answer
  • What are three recommendations for reducing risk and improving the privacy of your personal information while using social media
    13·1 answer
  • Which UML relationships should be used between a subclass and a superclass? For example, suppose there is an interface or abstra
    5·1 answer
  • Create a mobile app plan using PowerPoint slides to show mock-ups of screens,
    6·1 answer
  • What microphone is this
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!