64,670
社区成员
发帖
与我相关
我的任务
分享
#include<iostream>
using namespace std;
int main(int argc,char **argv)
{
if(argc!=3){
cout<<"you should use three arguments!"<<endl;
system("pause"); //这里也加上
return -1;
}
cout<<"summation of "<<argv[1]<<"and "<<argv[2]<<" is "
<<atof(argv[1])+atof(argv[2])<<endl;
system("pause");
return 0;
}