1
0
mirror of https://github.com/renbaoshuo/202401-programming-assignments.git synced 2024-12-16 15:44:39 +00:00
202401-programming-assignments/【实践课外】14.指针2/7-2 查找奥运五环色的位置.md

24 lines
537 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 7-2 查找奥运五环色的位置
奥运五环的5种颜色的英文单词按一定顺序排列{"red", "blue", "yellow", "green", "black" },定义指针数组并初始化,输入任意一个颜色的英文单词,从已有颜色中查找并输出该颜色的位置值,若没有找到,则输出"Not Found"。
### 输入格式:
输入一个代表颜色的单词。
### 输出格式:
输出单词对应的位置值如果未找到输出Not Found。
### 输入样例:
```in
yellow
```
### 输出样例:
```out
3
```