#include <iostream> using namespace std; int fac(int i) { int sum=1; for(int j=1;j<=i;j++) { sum*=j; } return sum; } int main() { int i; long long sum=0; for(i=1;i<=9;i+=2) { sum+=fac(i); } cout<<sum; return 0; }
int main() { int fact = 1, i, sum = 0; for (i = 1; i <= 9; i += 2){ fact *= i; if (i - 1)fact *= (i-1); sum += fact; } printf ("%d\n", sum); return 0; }