Untitled

 avatar
user_2696243
c_cpp
2 years ago
288 B
3
Indexable
Never
#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;
}