Sunday, 23 April 2017

6.Zero Duplicates

Zero Duplicates

Write a program that will read in a list of numbers and will then print out the same list except numbers that have already been printed will be printed as a zero instead.
Input Format:
Input consists of n+1 integers where n is the number of elements in the list. The first integer corresponds to n. The remaining n integers correspond to the elements in the list.
Assume that the maximum value of n is 100.

Output Format:
Output consists of n integers on separate lines.

code :

No comments:

Post a Comment