This is what Ive done, but it seems I was way off, and it doesnt work as planned.
Code:
#include <stdio.h>
int array[] = {3,5,0,7,4};
int main()
{
int x;
printf("%s", array);
x = my_getnbr(array);
printf("\n%d", x);
}
int my_getnbr(char *str)
{
int x, y, z;
y = 0, x = 0, z = 0;
while (*str != '\0')
{
str++;
y++;
}
while (x <= y)
{
while (z <= *str[x])
{
if (str[x] = 0)
z = z + 0;
z = z + 10000;
}
str++;
while (z <= *str[x])
{
if (str[x] = 0)
z = z + 0;
z = z + 1000;
}
str++;
while (z <= *str[x])
{
if (str[x] = 0)
z = z + 0;
z = z + 100;
}
str++;
while (z <= *str[x])
{
if (str[x] = 0)
z = z + 0;
z = z + 10;
}
str++;
while (z <= *str[x])
{
if (str[x] = 0)
z = z + 0;
z = z + 1;
}
}
}