im new at this too.. but did you forget to put your cast in the printf:

old code
Code:
	printf("Enter an integer\n");
	scanf("%d", &integer1);
new code
Code:
	printf("Enter an integer\n", integer1);
	scanf("%d", &integer1);
hehe, maybe