Exemplo n.º 1
0
int main(int argc, char *argv[]){
  if(argc == 2)
    print_sieves(atoi(argv[1]));
  else
    printf("Please state an interger number.\n");
  return 0;
}
Exemplo n.º 2
0
// 'argc' contains the number of program arguments, and
// 'argv' is an array of char pointers, where each
// char pointer points to a null-terminated string.
int main(int argc, char *argv[]){
  clock_t begin = clock();
  if(argc == 2){
    print_sieves(atoi(argv[1]));
    clock_t end = clock();
    printf("time elapsed: %f seconds\n",(double)(end-begin)/CLOCKS_PER_SEC);
  }
  else
    printf("Please state an interger number.\n");
  return 0;
}