ok i just decided to learn c about a week ago and have gotten through a little part of C for Dummies.....good book so far, i thought i was picking it up pretty well, until i tried to actually write something other than an example out of the book......obviously its a very simple program but i can't seem to get it right
my compiler is saying: "[Warning] passing arg 1 of 'gets' makes pointer from integer without a cast" on lines 9 and 11 and a "syntax error before "a"" on line 13Code:#include <stdio.h>
int main()
{
int a;
int b;
int x;
printf("Enter a number:");
gets(a);
printf("Enter the number you wish to multiply it by:\n");
gets(b);
x=(a*b);
printf("%d multiplied by %d equals %d\n" a,b,x);
return(0);
}
at one time i actually got the program to run, it asked me to enter a number and when i did i got one of those pop up errors that says math.c has encountered a problem and needs to close
i'm sure its something very simple im forgetting or just don't know about yet, any help or advice would be appreciated