My first ever program in C... V2.0


#include <stdio.h>
#include <stdlib.h>

int main()
{
    int a, b, c;

    printf( "Please enter a number: " );
    scanf( "%d", &a );
    printf( "You entered %d\n", a );
    printf( "Now lets add five to that!\n");
    getchar();
    a = a + 5;
    printf( "Here we are: %d\n", a );
    printf( "Now lets subtract another number from %d\n", a );
    printf( "Please enter a number: " );
    scanf( "%d", &b );
    printf( "You entered %d\n", b );
    c = a - b;
    printf( "Okay, now lets subtract it, here we are: %d", c );
    getchar();
    return 0;
}

Try it out! (made using codeblocks)

(Side suggestion: Add a codeblocks tag)

(Need help: Any way of doing "if" states in C?)