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
What is the function of cpu while processing data?​
attashe74 [19]

Answer:

"Store date, intermediate results, and instructions (program."

Explanation:

"CPU is considered as the brain of the computer. CPU performs all types of data processing operations. It stores data, intermediate results, and instructions (program). It controls the operation of all parts of the computer."

3 0
2 years ago
Read 2 more answers
What is the symbol that causes the computer to perform string concatenation?
neonofarm [45]

Answer: In java the symbol "+" operator is used to perform string concatenation.

Explanation:

String concatenation refers to joining of two strings. So in java + is used to join strings which works provided one of the operands must be a String variable. Then it works by converting the other variable to String variable and joins the second operand to the end of the first operand.

An example of String concatenation is as follows:

int age = 10;

System.out.println("The boys age is " + age);

Output:

The boys age is 10.

here, the age is integer variable but as the phrase "The boys age is" is a String variable so it converts the age to String variable and joins both the Strings.

4 0
3 years ago
What are the advantages of using a folder?​
Fofino [41]

Answer:

1. easy access to files

2. better organization

Explanation:

8 0
3 years ago
ASAP in the middle of this quiz Which of the following arguments might convince a local school board of the need to train upper
Arturiano [62]

Answer:

A.

Explanation:

Answer D seems too simplistic, and the question specifically mentions IT practices.

Question B doesn't seem right - college and high school students would likely be able to understand the principles as much.

Question C wouldn't be a good argument for a school board, and there's not a lot of evidence that backs it up.

Therefore, A seems to be the best choice here.

Hope this helps!

3 0
3 years ago
A 1000 elements array is used to store integers ascending order . The array is used to search binary search algorithm for the in
Yuri [45]

Answer:

The overview of the given scenario is described in the explanation section below.

Explanation:

  • BTS (Binary search tree) tends to be a tree with several nodes noting that perhaps the left sub-tree, along with its leaf, tends to have a key which is less than or equal to anything like the parental node value. The do-tree, including its leaf, seems to have a value greater than those of the key from it's own parent node.
  • Binary search algorithm finds a general vicinity in the collection of O(log n) time complexity items whereby n represents the number of elements in the array.

So the provided has never been the binary search trees of its algorithm.

A. 249

B. 342

5 0
3 years ago
Other questions:
  • What was the first<br> 1:search engine<br> 2:website<br> 3:time the internet started
    6·1 answer
  • What are the set of rules to move data from one computer to another?
    11·1 answer
  • What is a propriety database
    10·1 answer
  • The Leader Motive Profile (LMP) includes a: a. high need for power. b. low need for achievement. c. moderate need for power. d.
    6·1 answer
  • What is considered Tim Berners-Lee's greatest contribution to the World Wide Web?
    5·1 answer
  • 1)What is Big Data?
    14·1 answer
  • Jason has decided to use his name on all the images to protect them from misuse. He has also decided to use the logo of his comp
    15·2 answers
  • 1. What type of malware is triggered by a specific condition, such as a specific date or a particular user account being disable
    6·1 answer
  • Julie: 3: 36, 6:72, 9:108....tell me the next 3 ratios * math*
    11·1 answer
  • Activities provided for the satisfaction of others and consumed at the time of purchase<br> are…
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!