| 7 | using namespace std; |
| 8 | |
| 9 | double qwerty(double n, double sum, double fact) |
| 10 | { |
| 11 | for (int i = 1; i <= n; i++) |
| 12 | { |
| 13 | fact = fact * i; // calculating the factorial of the numbers |
| 14 | sum += (pow(i, i) / (fact)); // executing the sum of numbers |
| 15 | } //"pow" is raising 'i' to power 'i' |
| 16 | return sum; // |
| 17 | } // end function qwerty |
| 18 | |
| 19 | int main() |
| 20 | { |