Thanks for all your help so far. Here's what I have. Don't mind the printf checks. As you can see I am really new at this, and I need to see that even easy things like scans worked, by printing them.
Code:
#include<stdio.h>
#include <windows.h>
int main()
#define MAX 10
{
/* fill the first aray with their space numbers,
then print it to make sure*/
char isbn[10];
int a, b, c, space[10];
for (a=1; a <= 10; a++)
{
space[a]=a;
printf("%d\n",space[a]);
}
/* Enter isbn */
printf("\nPlease enter ISBN: ");
scanf("%s",isbn);
printf("\nChecking that the scanf string worked: %s",isbn);
/* So, right now, isbn is not an array of ints yet, its a
string. It needs to be copied 1 by 1 into an array of ints*/
"%1d", b=isbn;
for (b=0; b<10; ++b)
{
printf("\n%d", isbn[0]);
}
getch();
return 0;
}
This is where I am stuck. I want to have something like ""%1d", isbn[b],=isbn", thinking that it would assign the first digit of the isbn that the user typed in. And convert it to b, which was declared as a int, therefore making the isbn digit an integer. I wasn't worried about replicating this for the otehr digits, I just wanted to see if this would work.
Problem is I don't know if the "%1d" I have is having that effect. When I print I get an array of the same number, usually 48. So I'm afraid I'm on the wrong track now.