请问 system("pause"); 怎么用?
我是菜鸟,我写了个程序,结尾用了个system("pause"); 但是错的,请问这个语句怎么用?#include <iostream.h>
main ()
{
float a,b,c;
char d;
cout << "本程序只适合四则运算\n";
cout << "只进行加减乘除运算\n";
cin >> a >> d >>b;
switch(d)
{ case '-': c=a-b;
cout<< a <<"-"<< b << "=" << c <<endl;
break;
case '+': c=a+b;
cout<<a <<"+"<< b << "="<< c <<endl;
break;
case '*': c=a*b;
cout<<a <<"*"<< b << "="<< c <<endl;
break;
case '/': c=a/b;
cout<<a <<"/"<< b << "="<< c <<endl;
break;
default: cout << "输入的不是四则运算\n" ;
}
system ("pause");
}