mirror of
https://github.com/renbaoshuo/202401-programming-assignments.git
synced 2024-12-16 15:44:39 +00:00
24 lines
537 B
Markdown
24 lines
537 B
Markdown
# 7-2 查找奥运五环色的位置
|
||
|
||
奥运五环的5种颜色的英文单词按一定顺序排列{"red", "blue", "yellow", "green", "black" },定义指针数组并初始化,输入任意一个颜色的英文单词,从已有颜色中查找并输出该颜色的位置值,若没有找到,则输出"Not Found"。
|
||
|
||
### 输入格式:
|
||
|
||
输入一个代表颜色的单词。
|
||
|
||
### 输出格式:
|
||
|
||
输出单词对应的位置值,如果未找到,输出Not Found。
|
||
|
||
### 输入样例:
|
||
|
||
```in
|
||
yellow
|
||
```
|
||
|
||
### 输出样例:
|
||
|
||
```out
|
||
3
|
||
```
|