Untitled
user_2696243
c_cpp
3 years ago
288 B
11
Indexable
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int n, result = 1;
cout << "Please enter n: ";
cin >> n;
for (int i = 1; i <= n; i++)
{
result *= pow(i, i);
}
cout << "Result = " << result << endl;
return 0;
}Editor is loading...