I just got a Raspberry Pi. I went to open up Geany and I wrote a simple program and I compiled it by clicking the compile program button and it compiled without any errors. I got to run it by typing program.c and I get:

./program.c line 3 syntax error near unexpected token '("
./program.c line 3: 'int main(void)'

I also try compiling it with gcc by running gcc -o program.c and I get:

gcc: no input files


Help would be greatly appreciated. I read that if you have the file/application "Joe" on the Raspberry Pi it should do C programs and mine does but it seems to be having trouble compiling my program.