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 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog