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 / amit rawat
#include<iostream.h>
#include<conio.h>
void main()
{clrscr();
int ar[8]={2,3,4,5,2,9,8,7};
for(int i=0;i<8;i++)
{for(int j=i+1;j<8;j++)
{if(ar[i]==ar[j])
{cout<<"\n Repeated no is";cout<<ar[i];
}
}
}
getch();
}
| Is This Answer Correct ? | 33 Yes | 14 No |
Post New Answer View All Answers
On Monday a manufacturer processed a batch of bats, on Tuesday he processed three times as many, and on Wednesday he processed 4000 bats. In the three days, He processed 16000 bats. How many did he process on Tuesday?
‘a‘ number of persons work daily ‘b’ hours to produce ‘c’ items. If ‘d’ persons walks away from the group what will be the number of hours to produce ‘c’ items. ?
x + 4 y relation between x and y is x/2y = 3/2 ie x = 3y find the x -2y ratio
02: 1/3 of girls , 1/2 of boys go to canteen .What factor and total number of classmates go to canteen?
Each row of letters or numbers has a rule connecting them. Write the next number or letterin the brackets. 1 , 4 , 9 , 16 , 25 , 36 , (_ _ _)
A person spending out 1/3 for cloths , 1/5 of the remaining for food and 1/4 of the remaining for travelles is left with Rs 100/- . How he had in the beginning ?
If 15 pens costs Rs.90..then what will be the cost of 22pens?
The price of sugar increases by 20%, by what % house-wife should reduce the consumption of sugar so that expenditure on sugar can be same as before
Numbers of animals is 11 more than the number of birds. If the number of birds were the number of animals and number of animals were the number of birds( ie., interchanging number s of animals and birds.), the total number of legs get reduced by one fifth(1/5). How many no. of birds and animals were there?
Express 16 m/s into Km/hr
In which of the system, decimal number 194 is equal to 1234?
A clock is late by 1 minute 27 seconds in a month. Then how much will it be late in 1 day?
A School Has 30% Students From Maharashtra .out Of These 20% Are Bombay Students. Find The Total Percentage Of Bombay?
A car has run 10000 miles using 5 tyres interchangably,To have a equal wornout by all tyres how many miles each tyre should have run. answer 4000 miles/tyre
What number should be added to or subtracted from each term of the ratio 17 : 24 so that it becomes equal 1 : 2.