baybaye 2016-03-13 09:00 采纳率: 70%
浏览 1403
已结题

资料结构

In this assignment, you will practice programming by using recursive algorithm. In addition, you need to know the fundamental file I/O, and how to use command line arguments.
Use a command line argument with designated input and output file names. Read a set of non- redundant characters that are separated by comma (,) and enclosed by parentheses ({ }) in the input file. Create a pointer of characters to save the elements given. Then print out all permutation of the given set in the output file as follows.
1. Anexampleofcommandline >p2_1 input.txt output.txt
2. An example of input (input.txt) {a,b,c}
3. Corresponding output (output.txt)
{a,b,c} {a,c,b} {b,a,c} {b,c,a} {c,b,a} {c,a,b}
4. Conditions :

  • The element is one character.
  • The maximum number of elements in a set is 100.
  • You should use recursive algorithm. 中文翻译 在这个任务中,您将使用递归算法进行编程。另外,你需要知道我的基本文件,以及如何使用命令行参数。 使用指定输入和输出文件名的命令行参数。在输入文件中用逗号(,)和圆括号({ })所用的非冗余的字符集读取一组。创建一个字符的指针来保存给定的元素。然后打印输出文件中给定集合的所有置换如下。 1。anexampleofcommandline > p2_1 input.txt output.txt 2。输入一个例子(输入.txt){ A,B,C } 3。相应的输出(输出.txt) 4。条件: •元素是一个字符。 •集合中的元素的最大数目是100。 •你应该使用递归算法。

图片说明

  • 写回答

1条回答

  • devmiao 2016-03-14 04:23
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效