热门

最新

红包

立Flag

投票

同城

我的

发布
qq_63951087
c了个++
4 年前
trueqq_63951087

6翻了
#include<stdio.h>
#include<string.h>
int main()
{
char str[1005];
int count = 0, i, j;
gets(str);
for (i = 0; i <= strlen(str); i++)
{
if (str[i] == '6')
{
count++;
}
else
{
if (count > 9)
printf("27");
else if (count > 3)
printf("9");
else
{
for (j = 0; j < count; j++)
{
printf("6");
}
}
printf("%c", str[i]);
count = 0;
}
}
return 0;
}

CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
小白应该先从哪里开始学习?求求各位大佬
立即登录