當前位置:編程學習大全網 - 電腦編程 - c++primer plus 第六版上第四章的壹道編程題,怎麽做?

c++primer plus 第六版上第四章的壹道編程題,怎麽做?

#include?<iostream>

#include?<cstring>

using?namespace?std;

int?main()?{

char?fn[10],?ln[10],?re[20];

cin?>>?"First?name:?"?>>?fn;

cin?>>?"Last?name:?"?>>?ln;

strcpy(re,?fn);

strcat(re,?",?");

strcat(re,?ln);

cout?<<?"Result:?"?<<?re?<<?endl;

return?0;

}

  • 上一篇:從靜海區到天津市聖德培訓學校怎麽走
  • 下一篇:30歲學編程晚嗎?
  • copyright 2024編程學習大全網