概述
Description
Use pointers on array to write a program that reads in n integers and displays distinct numbers (ie., if a number appears multiple times, it is displayed only once).
Input
The first line is a positive integer t for the number of test cases.
Output
For each test case, outputs the distinct numbers in order in which they were read, seperated by one blank.
Sample Input
2 3 1 2 1 4 2 1 2 1
Sample Output
1 2 2 1 Problem Source: 程序设计I Chapter7 Pointers and C-String
conclusion:
|
Description
Use pointers on array to write a program that reads in n integers and displays distinct numbers (ie., if a number appears multiple times, it is displayed only once).
Input
The first line is a positive integer t for the number of test cases.
Output
For each test case, outputs the distinct numbers in order in which they were read, seperated by one blank.
Sample Input
2 3 1 2 1 4 2 1 2 1
Sample Output
1 2 2 1 Problem Source: 程序设计I Chapter7 Pointers and C-String |
最后
以上就是舒服乌冬面为你收集整理的1005. 7.2 Printing distinct numbers的全部内容,希望文章能够帮你解决1005. 7.2 Printing distinct numbers所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复