C入门问题 求助
刚刚开始学C,下面的程序工作,但为什么执行完一个操作后,就要关闭command 窗口呢? 求助
#include <stdio.h>
#include <stdlib.h>
//#define ENTER printf("Please any number to continue:")
int main()
{
int selection;
selection = getchar();
putchar('\n');
switch(selection)
{
case '1':
selection=='1';
printf("\006\006\006\006\006 System continues\n");//ir the enter = 10, then computer rings once
break;
case '2':
selection=='2';
printf("\003\003\003\003\003\n");
break;
default:
printf("end\n");
}
system("pause");
}