【c】小红的漂亮串

#include<stdio.h>
#include<string.h>
int main()
{
	char arr[1000];
	int count=0;
	gets(arr);//在数组中输入字符串
	int len=strlen(arr);//求字符串长度
	printf("%d\n",len);
	for(int i=0;i<len;i++)
	{
		if(arr[i]=='r')
		{
			if(arr[i+1]=='e')
			{
				if(arr[i+2]=='d')
				{
					count=count+1;
				}
			}
		}
	}
	printf("%d\n",count);
	if(count>=2)
	{
		printf("Yse\n");
	}
	else
	{
		printf("No\n");
	}
	return 0;
}

相关推荐

  1. 《牛客》-C字符串构造

    2023-12-07 23:16:08       40 阅读
  2. C#WPF仿苹果漂亮工具栏

    2023-12-07 23:16:08       33 阅读
  3. 名字漂亮

    2023-12-07 23:16:08       54 阅读
  4. 牛客周赛 Round 36----->C.白色字符串

    2023-12-07 23:16:08       45 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2023-12-07 23:16:08       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2023-12-07 23:16:08       106 阅读
  3. 在Django里面运行非项目文件

    2023-12-07 23:16:08       87 阅读
  4. Python语言-面向对象

    2023-12-07 23:16:08       96 阅读

热门阅读

  1. jdbc4.MySQLSyntaxErrorException: Query was empty

    2023-12-07 23:16:08       56 阅读
  2. TCP通讯

    TCP通讯

    2023-12-07 23:16:08      53 阅读
  3. Mysql事务隔离级别及其底层原理

    2023-12-07 23:16:08       66 阅读
  4. chrome issue -- list

    2023-12-07 23:16:08       65 阅读
  5. 【android开发-13】android中RecycleView的详细用法介绍

    2023-12-07 23:16:08       49 阅读
  6. 关于如何实现图片懒加载

    2023-12-07 23:16:08       64 阅读
  7. Docker 镜像构建的最佳做法

    2023-12-07 23:16:08       59 阅读
  8. leetcode:93. 复原 IP 地址

    2023-12-07 23:16:08       49 阅读