Esempio n. 1
0
int main(void)
{
	int v[21];
	int n=20;
	count c;

	setlocale (LC_ALL, "Portuguese");

	resetVetor(v, n);
	printf("Vetor usado \n");
	imprimeVetor(v, n);

	printf("selection Sort \n");
	c = selection_sort(v, n);
	automato( c, v, n);

	printf("Selecion Sort v2 \n");
	c = selection_sort2(v, n);
	automato( c, v, n);

	printf("Insertion Sort \n");
	c = insertion_sort(v, n);
	automato( c, v, n);

	printf("Bubble Sort \n");
	c = bubble_sort(v, n);
	automato( c, v, n);
	
	printf("Merge Sort \n");
	c = merge_sort(v, 0, n);
	automato( c, v, n);
	return 0;

}
Esempio n. 2
0
int main(){
    char *syntax[100];
    syntax[0]="program";
    syntax[1]="label";
    syntax[2]="const";
    char str[50]="program";
    look=str;
    
    automato(syntax,look);
   
    
    system("pause");
    
}