单项选择题

两次运行下列的程序,如果从键盘上分别输入3和1,则输出结果是()。
main()
int x;
scanf("%d",&x);
if(x++>2)printf("%d",x);
else printf("%d\n",x--);

A、 4和2
B、 4和1
C、 4和0
D、 3和1