|
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.内容请搜索靠谱客的其他文章。
发表评论 取消回复