⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.c

📁 A order algoritm comparison by the C time(). Comparison beetwen : insort,selection sort,mergesort,
💻 C
字号:
/************************************************************** * lasd main , programma codato da Enrico "lupsyn" Del Zotto  * ************************************************************** */#include "in.h"#include "func.h"#include "misc.h"void printArray(int A[], int n);void readArray(int A[], int n);void ready_array_and_order(int n,int length,int alg);int main(){int i,l,ciao;int A[20];mad_optimus(10,100);mad_optimus(20,100);mad_optimus(50,100);mad_optimus(100,100);mad_optimus(110,100);mad_optimus(120,100);mad_optimus(130,100);mad_optimus(140,100);mad_optimus(150,100);mad_optimus(160,100);mad_optimus(170,100);mad_optimus(180,100);mad_optimus(190,100);mad_optimus(200,100);mad_optimus(500,100);mad_optimus(1000,100);mad_optimus(5000,100);}/*---------------------------------------------------------------------- * Il main , funzione principale con controlli molo accurati sulle flag * in entrata *//* int main(int argc, char *argv[]) {   int n,optchar,length,insert_mode=0,alg_mode=0;   char    scelta;      if (argc<6) usage();   while ((optchar=getopt(argc,argv,"gl:i:a:"))!=EOF)   {   switch(optchar)       {       case 'h' : usage(); break;       case 'l' :                 if ((length=atoi(optarg)) > MAX_ARRAY_LENGTH)                 {                fprintf (stderr, "\nThe max buffer length was fixed to int %d if you want \n"                                 "to change it you must hand on the code\n\n\a",MAX_ARRAY_LENGTH);                exit(0);	                }                break;	case 'i' : if ((insert_mode=atoi(optarg)) > 1 || insert_mode < 0)                   {                   fprintf(stderr,"\nThe only insert mode are 0 for manual insert mode, and 1 \n"                                    "for random insert mode please see help...exit \n\n\a" );                  exit(0);                    }                   break;        case 'a': if ((alg_mode=atoi(optarg)) > 1 || alg_mode <0)                   {                   fprintf(stderr,"\nThe only algorith mode are 0 for Insertion sort\n"                                    "and 1 for Merge sort,please see help...exit\n\n\a");                   exit(0);                   }          }   }   system ("clear");   fprintf(stderr,"\n[@] Let's go to fill up the array... [*]\n\n");   ready_array_and_order (insert_mode,length,alg_mode);   fprintf(stderr, "[@] ...The End...  [@]\n\n");                  } */ /*end main*//*------------------------------------------------------------------------ * Questa 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -