Code:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define SIZE 81
void display(char *pointerCheck[]);
int main(void)
{
char str1[] = "0806509597";
display(&str1[]);
}
void display(char *pointerCheck[])
{
int w = 0;
int x = 0;
int temporary[10];
int y = 0;
int finalOutput;
char pointer[10];
int finalCheck;
for (x = 1; x <= 10;x++)
{
if (x == 10)
{
printf("Trial goto\n");
goto baba;
}
pointer[w] = *pointerCheck[w];
temporary[x] = atoi(&pointer[w]);
y = temporary[x] * (w + 1);
finalOutput += y;
printf("%d\n",y);
w++;
baba:
if(x == 10)
{
finalOutput = finalOutput % 11;
finalCheck = atoi(&*pointerCheck[9]);
if (finalOutput == finalCheck)
{
printf("Pokemon");
}
};
}
}
~Posted in another forum, but didn't get much of an idea~
Good day, I am having a problem with properly passing my str1 with the string included. Anyone can help me fix this? thanks.