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
Factorize y**2 + 8y - 48 =0
A gardener plants 100 meters towards east, next 100 meters towards north,next 100 meters towards west. 98 meters towards east, 96 meters towards north and 96 meters towards west, 94 towards west. 98 meters towards east, 96 meters towards north and 96 meters towards west, 94 meters towards south. and 94 meters towards east and so on. If a person walks between the trees what is the total distance travelled by him before he reaches the center.
There are A,B techers and C,D doctors.Find the possible no of combinations that should not be repeated more than once?
Business Analytics What's the difference between logistic and linear regression? How do you avoid local minima?
A job may be completed in 12 days, working for 8 hours a day if 20 men or 24 women or 40 boys perform the task. If a task four times as big as this is done for 5 hours a day for 12 days, how many men will be required to join 6 women and 2 boys to complete the task?
Find sum of 3 + 5/(1+22) + 7/(1 + 22 + 32) + ......
There's a camel living in a desert. There is a market 1000 miles away. The camel has 3000 dates for sale. It has to take the date to the market. But for that hte camel eats one date per mile. How many dates the camel can trade?
Find the nth number in the series is 1, -3, 5, -7.___
If a bat costs Rs.30 in the year 1999 and Rs.250 in the year 2000.What is the percent increase in price?
If ABC =C3C3 and CAB = D3D3, Then find D3÷B3D3÷B3
A student gets 70% in one subject, 80% in the other. To get an overall of 75% how much should get in third subject.
in the year 1990 there are 5000 men 3000 women 2000 boys .in 1994 men are increased by 20% women are increased by ratio of boys and women
Find the next letter in the series c,o,m,p,u,t,e--
What is the code formed by reversing the First and second letters, the third and fourth letters and son on of the string SIMULTANEOUSLY?
Sum of slopes of 2 perpendicular st. lines is given. Find the pair of lines from the given set of options which satisfy the above condition?