【文件属性】:
文件名称:数据结构 顺序查找 上机实验
文件大小:1KB
文件格式:TXT
更新时间:2014-01-02 14:00:17
顺序查找 数据结构
Input
第一行:元素个数n
第二行:依次输入n个元素的值
第三行:输入要查找的关键字key的值
Output
输出分两种情形:
1.如果key值存在,则输出其在表中的位置x(表位置从1开始),格式为The element position is x.
2.如果key值不存在输出:"The element is not exist."
Sample Input
6
1 3 5 7 9 10
5
Sample Output
The element position is 3.
网友评论
- 不错的资料,果断下载啦