/*
*求i!*2^i序列的值且不超过maxint
*当某一项的结果超过了maxint时,它除以前面一项的商会发生异常.
*/
#include<stdio.h>
#define MAXSIZE 9
void main()
{
int last,i;
int a[MAXSIZE];
last = 1;
for(i = 1; i <= MAXSIZE; i++)
{
a[i-1] = last*2*i;
if((a[i-1]/last) != (2*i))
return;
last = a[i-1];
}
printf("%d\n",last);
system("pause");
}