单项选择题

x=-2; y=-1; if(x!=0) if(x>0) y=1; else y=0; 该程序段的输出结果为()。

A.1
B. 0
C. -1
D. 不确定