文件名称:homework_2.22
-
所属分类:
- 标签属性:
- 上传时间:2014-05-08
-
文件大小:1.06kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
对单链表实现就地逆置,即利用原表的存储空间将线性表(a1,a2,…,an)逆置为(an,an-1,…,a1)。输入数据:文本文件input.txt
文件分2行:
第1行是单链表的数据元素个数n,n<20。如果n<1或n>19则视为输入数据出错。
第2行是单链表的n个数据元素,每个元素都是-999~999之间的十进制整数,元素之间用空格分开。
输出数据:文件output.txt
文件只有1行:
第1行是完成逆置之后的单链表n个元素的十进制整数,每个元素之间用空格分开。
如果输入数据出错,或者运行过程出错、问题无解等,则第1行输出字符串“ERROR”。
-Single linked list implementation situ reverse position, namely the use of the storage space of the original tables linear table (a1, a2, ..., an) inverse set (an, an-1, ..., a1). Input data: text file input.txt file sub 2 lines: Line 1 is the number of a single list of data elements n, n < 20. If n < 1 or n> 19 is considered to input data error. The second line is a single-chain n data elements, and each element is a decimal integer between-999 to 999, separated by a space between the elements. Output data: file output.txt file has only one line: Line 1 is set after the completion of the reverse single linked list of n decimal integer elements, separated by a space between each element. If the input data error, or an error during the operation, the problem has no solution, etc., then the first line of the output string " ERROR" .
文件分2行:
第1行是单链表的数据元素个数n,n<20。如果n<1或n>19则视为输入数据出错。
第2行是单链表的n个数据元素,每个元素都是-999~999之间的十进制整数,元素之间用空格分开。
输出数据:文件output.txt
文件只有1行:
第1行是完成逆置之后的单链表n个元素的十进制整数,每个元素之间用空格分开。
如果输入数据出错,或者运行过程出错、问题无解等,则第1行输出字符串“ERROR”。
-Single linked list implementation situ reverse position, namely the use of the storage space of the original tables linear table (a1, a2, ..., an) inverse set (an, an-1, ..., a1). Input data: text file input.txt file sub 2 lines: Line 1 is the number of a single list of data elements n, n < 20. If n < 1 or n> 19 is considered to input data error. The second line is a single-chain n data elements, and each element is a decimal integer between-999 to 999, separated by a space between the elements. Output data: file output.txt file has only one line: Line 1 is set after the completion of the reverse single linked list of n decimal integer elements, separated by a space between each element. If the input data error, or an error during the operation, the problem has no solution, etc., then the first line of the output string " ERROR" .
(系统自动生成,下载前可以参看下载内容)
下载文件列表
homework_2.22/homework_2.22参考答案一.c
homework_2.22/input.txt
homework_2.22/output.txt
homework_2.22
homework_2.22/input.txt
homework_2.22/output.txt
homework_2.22
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.