I need some help with this one.. I can't find anything similar to this exercise online. I've read the chapter about arrays in my coursebook and watched several youtube tutorials but I just can't figure this one out.
It's pretty embarrasing but here's one of my tries thus far, I know there's probably many errors but every time I try to change anything it seems to get worse.
int main()
{
char s[61];
int n;
char c;
while (scanf("%60s", s)==1)
{
for (int i=0; i<n; i++)
{
scanf("%d", &n[i]);
}
scanf("%c", &c);
printf("%c\n", s[c]);
}
}