I'm just starting out with C and I'm off to a bad start. First off, this isn't homework, this is just me trying to familiarize myself with the idea of the Loops. I have two programs, neithither of which are compiling through the Virtual Box uBuntu and the terminal emulator. I got the code off of this site's tutorial.

Any insight?

This is the while loop.
Code:
#include <stdio.h>

intmain()
{
    int x = 0;
    
    while ( x < 10 ) {
        printf( "%d \n", x );
        x++;
    }
    getchar();
}
And here is the for loop.
Code:
#include<stdio.h>

int main()
{
    int x;
    for (x=0; x < 10; x++) 
    {
        printf( "%d\n", x );
    }
    getchar();
}
I'm aware that these should be two very easy concepts consdering the semester is only 3 weeks in.

Thanks for any help!
Robert