标签:turn pre names max style char ++ while apn
#include<iostream> #include<stdio.h> #include<string> #include<cstring> #define maxn 150 using namespace std; char mapn[maxn][maxn]; int main() { char str[150]; while(gets(str)!=NULL) { int sum; for(int i=0;i<strlen(str);) { sum = 0; if(str[i] == ‘!‘) printf("\n"); while(str[i]>=‘0‘&&str[i]<=‘9‘)//数字累加,11累加为2 { sum += str[i] - ‘0‘; i++; } if(str[i] == ‘b‘) str[i] = ‘ ‘; for(int j=0;j<sum;j++) printf("%c",str[i]); i++; } printf("\n"); } return 0; }
标签:turn pre names max style char ++ while apn
原文地址:http://www.cnblogs.com/l609929321/p/6836413.html