codeforces 133A-C语言解题报告

133A题目网址

题目解析

1.输入字符串,如果里面包含H,Q,9,就输出YES,否则输出NO

代码

#include<stdio.h>
#include<stdlib.h>
#include<string.h>int main()
{char c[100]={'0'};int flag=0;int i;scanf("%s",c);for(i=0;i<strlen(c);i++){if(c[i]=='H'||c[i]=='Q'||c[i]=='9'){		flag=1;break;}}if(flag){printf("YES");}else{printf("NO");}getchar();system("pause");return 0;
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/446604.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

c++面向对象高级编程 学习十 function-like classes

本节是设计一个class&#xff0c;使它的行为像一个函数。 如果一个东西能接受小括号()操作符&#xff0c;那么这个东西就称之为函数&#xff0c;或像函数的东西。 下图为三个函数对()的重载&#xff0c;这三个类均为像函数的类&#xff0c;它们可接受()操作符&#xff0c; 标…

数据结构 栈

代码 #include <stdio.h> #include <stdlib.h>/************************************************************************/ /*栈应用示例--数制转换要求&#xff1a;输入任意的正整数N(十进制)&#xff0c;分别输出该整数的二进制、八进制、十六进制的结果算法…

英语口语 Week14 Monday

英语文章 Thailand, a country in Southeast Asia with an area of about 514,000 square kilometers, has been increasingly prosperous in its tourism industry in the past few decades. Its capital is Bangkok and its major languages are Thai, Chinese and English.…

c++面向对象高级编程 学习十一 类模板、函数模板、成员模板

namespace经验谈&#xff1a; 团队中函数或类的名字可能会冲突&#xff0c;因此使用namespace进行区分。 类模板&#xff1a; template<typename T> 函数模板&#xff1a; template<class T>&#xff0c;此处class可改成typename 函数模板在使用的时候&#xff0…

操作系统面试 总结

以下文章来源于程序员cxuan &#xff0c;作者cxuan 原文链接什么是操作系统 操作系统是管理硬件和软件的一种应用程序。操作系统是运行在计算机上最重要的一种软件&#xff0c;它管理计算机的资源和进程以及所有的硬件和软件。它为计算机硬件和软件提供了一种中间层&#xff…

英语口语week 14 Thursday

英语文章 A couple decided to go out to celebrate their wedding anniversary, so they called a babysitter. When the babysitter arrived, the two children had already been asleep. The babysitter soon got bored and went to the kitchen where she blended some wh…

c++面向对象高级编程 学习十二 模板

模板特化&#xff1a; 模板是一种泛化的形式&#xff0c;特化是将参数类型进行指定&#xff0c;写出特化的版本&#xff0c;当在调用下图cout<<hash()(1000);的时候&#xff0c;由于特化中有struct hash{ }的版本&#xff0c;因此会直接调用特化部分。 模板偏特化&…

英语口语 week14 Friday

英语文章 Shopping is taking place every second. However, the prices of the same goods may differ from store to store. A name-brand dress may cost several hundred pounds at a boutique, but only half the price in a discount store or a big chain store. Moreo…

c++面向对象高级编程 学习十三 数量不定的模板参数,auto,for

文章目录数量不定的模板参数autoranged-base for数量不定的模板参数 void print() {} //... 表示参数的数量不定 template<typename T, typename...Types> void print(const T&firstArg, const Types&...args) {cout << firstArg << endl;cout<&…

数据结构 树

定义 树是节点的优先集合度&#xff1a;孩子的数量&#xff0c;度为0 就是终端节点&#xff0c;不为零就是根节点有序树&#xff1a;有顺序&#xff0c;不可以替换无序树&#xff1a;无顺序&#xff0c;可以替换深度 和 树的深度相反&#xff0c;第一层深度为1 树的深度为 3 二…

英语口语 Week15 TuesDay

英语文章 One day, when Bella was doing sports in the school yard, the squirrel fled out of her sleeve. Threading its way through a considerable number of people, the squirrel disappeared in the distance After a sequence of movements, it hopped onto the ar…

c++面向对象高级编程 学习十四 引用

文章目录referencereference的常见用途reference 变量有三种形式&#xff1a;值&#xff0c;指针&#xff0c;引用 int x0; //值 int* p&x;//指向整型的指针&#xff0c;地址&#xff0c;指针在之后的程序中可以指向其他变量 int& rx;//引用&#xff0c;此处表示 r代…

google浏览器 隐藏功能开启

网址 chrome://flags/ 1&#xff0c;多线程下载 2&#xff0c;暗黑模式3&#xff0c;标签缩略图4&#xff0c;PWA 渐进式web应用 网页即应用5&#xff0c;阅读模式&#xff0c;排除广告&#xff0c;点击阅读模式去除干扰chrome://net-internals6&#xff0c;解决有问题的代理IP…

英语口语Week 15 Wednesday

英语文章 Accomplishing the task assigned by the teacher; Julia rushed out. Squatting at the gate and playing with the squirrel, Bella waved at the sight of Julia and yelled out here" . Julia ran quickly towards them, pointed at the squirrel and asked…

c++面向对象高级编程 学习十五 组合继承关系下的构造和析构

文章目录继承关系组合关系继承和组合继承关系 构造由内而外&#xff0c;析构由外而内&#xff0c;内即是父类 组合关系 A拥有B&#xff0c; 构造由内而外&#xff0c;析构由外而内&#xff0c;内即是B 继承和组合 构造和析构顺序如图&#xff1a;

英语口语Week16 Wednesday

英语文章 Recently my friend received a gift from her boyfriend - a very expensive bracelet. But the substance of her response left us in astonishment - she didn’t attend to the exquisiteness(of the gift and wanted to return it to him In terms of salary, …

C++ 查漏补缺

特性关系 C语言面向过程C面向过程 面向对象(封装 继承 多态)C具备C语言的全部特性的基础上&#xff0c;并且支持更多新的特性 内存泄露 申请内存&#xff0c;没有释放申请 malloc new释放 free deleteProcessExplorer查看内存是否释放 代码移植 将生成的exe运行在别的平台&…

c++面向对象高级编程 学习十六 vptr和vtbl

当一个类中有一个或多个虚函数时&#xff0c;内存中会多一个虚指针&#xff08;vptr&#xff0c;virtual pointer&#xff09;&#xff0c;指向一个虚表&#xff08;vtbl&#xff0c;virtual table&#xff09; 父类有虚函数&#xff0c;则子类一定有虚函数 在下图示意图中&a…

英语口语Week16 Thursday

英语文章 It is an impossibility that everything runs smoothly in everyday life. Where there is trouble, there could be anxiety.Anxiety is a common phenomenon; you are not the only one carrying it. But, it could be somewhat poisonous if you don’t let it o…

c++面向对象高级编程 学习十七 const, new, delete

文章目录常量成员函数new和delete常量成员函数 常量成员函数是不改变成员数据。 当成员函数的const和non-const版本同时存在时&#xff0c;const object只能调用const版本&#xff0c;non-const object只能调用non-const版本。因此&#xff0c;可以看出&#xff0c;const是函…