#include #include #include #include #include #include #define pi 3.14159265358979323844 long IDUM=-12345; double ran2(void); void main(){ int a,z,n,j,twoj; double be,ex,dummy1=123456789; double degen; char dumbstring[100]; int iemax[100][100]; int firstvisit[100][100]={-1}; ifstream isotable_file; ofstream results_file; isotable_file.open("isotope_table.dat"); for(a=0;a<100;a++){ for(z=0;z<=a;z++){ iemax[a][z]=-1; } } while(isotable_file >> z >> n >> be >> ex >> j){ cout << form("z=%d n=%d be=%g ex=%g j=%d\n",z,n,be,ex,j); isotable_file.getline(dumbstring,90); a=z+n; iemax[a][z]=iemax[a][z]+1; firstvisit[a][z]=1; } isotable_file.close(); isotable_file.open("isotope_table.dat"); while(isotable_file >> z >> n >> be >> ex >> twoj){ isotable_file.getline(dumbstring,90); if(j==-1) j=0; be=-be; a=z+n; results_file.open(form("a%dz%d.tmp\0",a,z),ios::app); if(firstvisit[a][z]==1){ results_file << "a=" << a << ", z=" << z << endl; results_file << setw(14) << dummy1 << setw(14) << iemax[a][z]+1 << endl; } degen=twoj+1; if(a==2&&be>0) degen=0.3; results_file << setw(14) << be << setw(14) << degen << endl; results_file.close(); firstvisit[a][z]=0; } isotable_file.close(); } //#include "/usr/users/pratt/inputs/ran2.c"