A) cu FOR
#include <iostream>
using namespace std;
int n,i,p;
int main(){
cout<<"n=";
cin>>n;
p=1;
for(i=1;i<=n;i++){
p=p*4*i;
}
cout<<endl<<"p="<<p;
}
b) cu WHILE
#include <iostream>
using namespace std;
int n,i,p;
int main(){
cout<<"n=";
cin>>n;
p=1;
while(n){
p=p*4*n;
n--;
}
cout<<endl<<"p="<<p;
}