Input an array and then print the repeating characters??
Example:
Input:1,3,23,11,44,3,23,2,3.
Output:3,23
plz help me.... i want a code of it. In C language.
Answer Posted / saurabh singh
n = [int(x) for x in input().split()]
for i in range(len(n)):
for j in range(i+1, len(n)):
if n[i] == n[j]:
print(n[i])
#saurabhsingh
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Two trains at speed 60 km/hr come in the opposite direction. At a particular time the distance between the two trains is 18km. A shuttle flies between the trains at the speed of 80 km/hr. At the time the two trains crashes what is the distance traveled by shuttle?
B is 20 miles east of A. D is 30 miles east of C. E is 10 miles north of D. C is 20 miles north of B. How far E is from A?
aptitude questions
THERE ARE 3 PILES OF BOOKS ON THE TABLE YOU NEED TO ARRANGE THEM IN THE SELF SUCH THAT 1ST BOOK OF EACH PILE GETS PLACED ON THE SELF,WHAT IS THE POSSIBLE NO OF ARRANGEMENTS
A printer produced 176,400 pages in a given day. If the printer was in operation for seven hours during the day, how many pages did it print per minute?
Which one of the following is correct a) $$Z(4).99 b) $9(4)zz.99 c) A(4)BB d) +9(5).99CR
In how many rows will 200 Miranda bottles be placed, if 200 Miranda bottles are stacked in such a way that there are 20 bottles in the bottom, 19 in the next row, 18 in the row next and so on?
A cylinder is inserted in a sphere d/h = 2/3. Find the surface area of the cylinder ?
George while driving along the highway saw road markers which are at equal distances from each other. He crosses the markers every 20 seconds. If he increases his speed by x meters per second, he crosses the markers at every 15 seconds. But if he increases his speed by y meters per second, he crosses the marker at every 10th second. If y-x = 40 meters per second, then what is the distance between two markers.
Express 16 m/s into Km/hr
in a market 4 man are standing .the average age of the four before 4years is 45,aftyer some days one man is added and his age is 49.what is the average weight of all?
sir plz send the rrb exam question papers my emailid is abhilasha.bollepalli@gmail.com
Refer to the figure below.A ship started from P and moves at a speed of I miles per hour and another ship starts from L and moving with H miles per hour simultaneously.Where do the two ships meet? ||---g---||---h---||---i---||---j---||---k---||---l---|| PG H I J K L are the various stops in between denoted by || . The values g, h, i, j, k, l denote the distance between the ports.
The rectangle box with square base is open at the top. The maximum volume of the box made from 1200 m2 tin,in m3 is?
Three pipes, A, B, & C are attached to a tank. A & B can fill it in 20 & 30 minutes respectively while C can empty it in 15 minutes. If A, B & C are kept open successively for 1 minute each, how soon will the tank be filled?