Quick actions

cmd+k|ctrl+k

Navigation

Languages

Z2

Snippet info

Language

Cpp

Visibility

public

Author

krip4yk

Created

2015-09-02T07:05:49Z

Updated

2015-09-02T07:06:05Z

#include <iostream>
using namespace std;

int main() {
    int a,b;
    a=1;
    for (int i=2; i<=14; i++)
    {
        b=1;
        for (int j=2; j<=i; j++)
        {
            b*=j;
        }
        a+=i*b;
        cout << i << ": " << a << endl;
    }
    return 0;
}
INFO