Hi guys! So, I'm trying to write a program that gets the GCD of two numbers (I know, it's real easy, but I'm just doing this as a refresher), and I've finished writing the code, got it to compile and run, but when I ran it, the output is so whacked up that I don't really know what just happened:

Name:  01.png
Views: 114
Size:  9.4 KB

Code:
#include<stdio.h>
#include<conio.h>
main()
{
int a,b,rem;
clrscr();
printf("A:");
scanf("%d",a);
printf("B:");
scanf("%d",b);
rem=a % b;
	while(rem!=0){
	  a=b;
	  b=rem;
	  rem=a%b;
	  printf("%d\n",rem);
	}
printf("GCD:%d",rem);
getch();
}
Do you think it has something to do with the hardware/OS? I'm using Win7 x64, and as far as I can remember, the OS is not compatible with 16-bit applications.