摘要: 1、转换字符串的输入格式为:原来字符串里的字符+该字符连续出现的个数,例如字符串:1233422222,转化为1121324125。 我们用sprintf来实现,类同printf。#include "iostream"#include "string"using namespace std;int main() {cout << "Enter the numbers: " << endl;string str;cin >> str;size_t ilength = str.length();int 阅读全文
posted @ 2011-05-03 23:45 浪里飞 阅读(488) 评论(0) 推荐(0) 编辑