Răspuns:
1.
#include <iostream>
using namespace std;
int main() {
int n;
n = 10;
while(n > 0)
{
cout<<n<<endl;
n--;
}
return 0;
}
2.
#include <iostream>
using namespace std;
int main() {
int i, p = 1;
for(i = 1; i<= 20; i++)
{
if(i % 4 == 0)
p = p * i;
}
cout<<"produsul este:" <<p;
return 0;
}
sau varianta cand mergem din 4 in 4
#include <iostream>
using namespace std;
int main() {
int i, p = 1;
for(i = 4; i<= 20; i= i + 4)
{
p = p * i;
}
cout<<"produsul este:" <<p;
return 0;
}