cat prime.f /* prime.f May 3, 1987 */ prime(h) /* Interacts with user to generate a prime suitable to be a factor in the the product that becomes the masterkey. Called twice, generates two factors */ char *h ; { char *x, *y, *z, *malloc() ; char f1, f2 ; x = malloc(15) ; y = malloc(15) ; z = malloc(15) ; copy(xero,x) ; copy(xero,y) ; copy(xero,z) ; f1 = 'y' ; while( f1 == 'y') { printf("\nEnter a prime number seed.") ; scanf("\n %s",x) ; printf("\nEnter a starting number") ; scanf("\n %s",y) ; printf("\n") ; pad(x) ; pad(y) ; printf("seed is %s, starting search at %s\n", x,y) ; f2 = 'y' ; while(f2 == 'y' ) { search(y,x,z) ; printf("%s is a prime, new search starts at %s \n", z,y) ; add(y,one) ; printf("Continue this search? y/n \n") ; scanf("\n%c",&f2) ; } printf("\nAnother search? y/n\n") ; scanf("\n %c",&f1) ; } copy(z,h) ; } $