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
Step-by-step 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.