Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*int *Ex_2(int n, int arr[])
- {
- int n2 = n, index1 = 0, index2 = 0, num = 0;
- int *arrpt = &arr[index1];
- int *arrnew = calloc(sizeof(int) * n2);
- for (index1 = 0;index1 < n2 ;index1++)
- {
- num = arr[index1];
- if (isInArr(num, arrnew,n2) != 1)//האם המספר במערך
- {
- arrnew[index1] = num; //לא, אז תכניס אותו למערך
- }
- }
- return *arrnew;
- }
- int isInArr(int num,int *arr,int n2)
- {
- int index = 0;
- for (index = 0;index < n2;index++)
- {
- if (num == arr[index])
- {
- return 1;
- }
- }
- }*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement