#include <iostream>
using namespace std;
int main() {
int n;
cout<<"enter a number"<<endl;
cin>>n;
int x;
int a;
a = 4; //initiallization of gp
for (x=1 ; x<=n ; x++ ){ //loop statement
cout<<a<<" "; //printing
a = a*3; //desired number multiplication to the number we got from loops
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: