最骚A+B
查看原帖
最骚A+B
533067
Syncwithme楼主2021/7/20 08:09
#include <bits/stdc++.h>
using namespace std ;
int execmd(const char* cmd,char* result) {
    char buffer[1000000]; 
    FILE* pipe = _popen(cmd, "r"); 
    if (!pipe)
    return 0; 
    while(!feof(pipe)) {
    	if(fgets(buffer, 128, pipe)){ 
    	strcat(result,buffer);
    	}
    }
    _pclose(pipe);
    return 1; 
}
int main(){
    char result[ 1024* 4]= "";
    string a, b;
    cin >> a >> b;
    string ans = "powershell ";   //直接调用powershell进行加法
    ans += a + "*" + b;
    if( 1==execmd(ans.data(),result)){
    printf(result);
    }
    system( "pause"); 
}
2021/7/20 08:09
加载中...