1 #include "stdafx.h" 2 #include <iostream> 3 #include <exception> 4 using namespace std; 5 6 /*替换空格*/ 7 /* 8 题目:请实现一个函数,把字符串中的每个空格替换成"%20".例如输入"We are happy",则输出"We%20are%20happy". 9 */ 10 int ReplaceBlank(char string[],int length) 11 { 12 int i = 0; 13 int blankNum=0; 14 int strLength=0; 15 while(string[i]!='