Ok I am trying to get this extremely simple code to work(it is in the book I am trying to use to learn C from) any ways my compiler says I have 12 errors!!
I know that is pathetic for something this small but it is my first program and I looked it over and I just can't find out what is wrong with it. Anyways here is the source code:

/* Program multiplies two numbers together and displays the results*/

#include <stdio.h>

int a,b,c;
int product(int x, int y);

main()
{
/* Input the first number */

printf("Enter a number between 1 and 100: ")
scan(%d", &b);
c=product(a,b);
printf ("%d times %d=%d\n", a,b,c);

/* Input the second number*/

printf("Enter another number between 1 and 100: ");
scanf("%d, &b);

/* Calculate and display the product */

c=product(a, b);
printf ("%d times %d = %d\n", a,b,

return 0;
}

/*Function returns the product of its two arguments */

int product(int x, int y)
{
return (x*y);
}

Keep in mind it isn't the book, I am trying not to just copy and paste(it is an e-book) because I want to get a feel for the language so that is where the mistakes come from. Please help.

2. I found a couple simple misakes,

/* Input the first number */

printf("Enter a number between 1 and 100: ")
scan(%d", &b);

printf(" enter a number between 1 and 100: ");
forgot the semicolen at the end

scanf("%d", &b);
forgot the f in scanf and " in "%d",

======================================

/* Calculate and display the product */

it's:
printf("%d times %d = %d\n", a,b,);
forgot the ) and the semicolen at the end.

That's all I could find.

3. here you go dude - I took out the function

Code:
```#include <stdio.h>

int a,b,c;
int product(int x, int y);

int main()
{
/* Input the first number */

printf("Enter a number between 1 and 100: ");
scanf("%d", &b);

/* Input the second number*/

printf("Enter another number between 1 and 100: ");
scanf("%d", &a);

/* Calculate and display the product */

c = (a * b);
printf("%d times %d = %d\n", a,b,c);

getch();

return 0;
}```

4. I dident think the function had to be in there but i'm still not that good of a C guy but i'm getting there.

5. Heres how you would do it if you wanted the function.

Code:
```#include <stdio.h>

int a,b,c;
int product(int x, int y);

int multiply(int num1, int num2)
{

int total = 0; /* defining what to send back to main */

total = num1 * num2;

return(total);
}

int main()
{
/* Input the first number */

printf("Enter a number between 1 and 100: ");
scanf("%d", &b);

/* Input the second number*/

printf("Enter another number between 1 and 100: ");
scanf("%d", &a);

/* Calculate and display the product */

printf("%d times %d = %d\n", b,a,multiply(a,b));

getch();

return 0;
}```

6. Thanks I will try out those and see, the books code is right(I tried copying and pasting just to see)but I want to try and type out the code so I can learn it...still I don't know what I mistyped, oh well thanks a lot.

__________________________________________________ __------------------------------------------------------------------------------------