Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "C:\\dllBridge\\dllBridge.h"
- #include <stdlib.h>
- int //array_a[10] = {0, 9, 8, 7, 6, 5, 4, 3, 2, 1},
- size = 30;
- int sort_buble(int *, int hjfkhjkhghgkhjghjg78876786876786);
- /////////////////////////////////////////////////////////////////
- int main() //
- {
- srand(78678);
- if(dllBridge_init(74) > 0)
- {
- for(int i = 0; i < 30; i++) Transit[1][i] = rand()%400;
- Sleep(7000);
- int res = sort_buble(&Transit[1][10], 10);
- printf("Number of permutation = %d\n", res);
- Sleep(7000);
- }
- __DisConnect(ProgramNumber); printf("\t Отключились от \"dllBridge.dll\"");
- }
- ///////////////////////////////////////////////////////////////////////////////////
- int sort_buble(int *p, int sz)
- {
- int a,
- counter = 0;
- for (int for_a = 0; for_a < sz; for_a++)
- {
- for (int for_b = 1; for_b < sz; for_b++)
- {
- if(p[for_b - 1] > p[for_b])
- {
- a = p[for_b];
- p[for_b] = p[for_b - 1];
- p[for_b - 1] = a;
- counter ++;
- }
- }
- }
- return counter;
- }
- /*
- #include <stdio.h>
- #include <locale.h>
- int array_a[10] = {0, 9, 8, 7, 6, 5, 4, 3, 2, 1},
- size = 10;
- /////////////////////////////////////////////////////////////////
- int main() //
- {
- setlocale(LC_ALL, "ru");
- int a;
- for (int for_a = 0; for_a < size; for_a++)
- {
- for (int for_b = 1; for_b < 10; for_b++)
- {
- if (array_a[for_b - 1] > array_a[for_b])
- {
- a = array_a[for_b];
- array_a[for_b] = array_a[for_b - 1];
- array_a[for_b - 1] = a;
- }
- }
- }
- for (int for_a = 0; for_a < size; for_a++)
- {
- printf("%d\n", array_a[for_a]);
- }
- }
- */
- /*
- #include "C:\\dllBridge\\dllBridge.h"
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
- // The dllBridge-folder should be here: "C:\dllBridge". !
- // !
- // Already connected in the "dllBridge.h" file !
- // - - - - - - - - - - - - - - - - - - - - - - - - !
- // #include <stdio.h> !
- // #include <string.h> !
- // #include <locale.h> !
- // #include <windows.h> !
- // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
- int nArr[123] = {7, 23, 12, 777, 6};
- // Демонстрация подключения для языка Си
- ///////////////////////////////////////////////////////////////////////////////
- int main() //
- {
- int b = 0;
- if(dllBridge_init(7564) > 0)
- {
- for(int i = 140; i > 0; i--) Transit[1][b++] = i;
- Sleep(23000);
- }
- __DisConnect(ProgramNumber); printf("\t Отключились от \"dllBridge.dll\"");
- return 0;
- }
- */
- /*
- while(1)
- {
- Transit[5][29]++;
- Sleep(100);
- }
- */
- /*
- for(int i = 4; i < 25; i += 2) // Подождём 25 секунд и отключимся.
- {
- Sleep(1000);
- Transit[3][i] = 1000 + i ; // Содержимое этого массива просматривайте, через программу "UniMons.exe"
- printf("%d\n", 1000 + i);
- }
- */
- /*
- #include <stdio.h>
- int charpp(char *, char *);
- /////////////////////////////////////////////////////////////////
- int main() //
- {
- char char_a[100] = "Xhuh=";
- char char_b[100] = "_Y1234567890";
- charpp(char_a, char_b);
- printf("%s\n", char_a);
- return 0;
- }
- /////////////////////////////////////////////////////////////////
- int charpp(char* char_a, char* char_b) //
- {
- int c = 0;
- while(char_a[++c]);
- for(int i = 0; char_b[i]; i++)
- {
- char_a[i + c] = char_b[i];
- }
- return *char_a;
- }
- */
- /*
- /////////////////////////////////////////////////////////////////
- int charpp(char* char_a, char* char_b) //
- {
- int c = 0;
- while(char_a[++c]);
- for(int for_a = 0; char_b[for_a]; for_a++)
- {
- char_a[for_a + c] = char_b[for_a];
- }
- return *char_a;
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement