Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / ankit dhanna

#include<iostream.h>
#include<conio.h>
void main()
{
int a[8],i,j,k,temp[8];
k=0;
cout<<"enter 8 elements "<<endl;
for(i=0;i<8;i++)
{
cin>>a[i];
}

for(i=0;i<8;i++)
{
for(j=0;j<8;j++)
{
if((a[i]==a[j])&&(i!=j))
{

temp[k]=a[i];
k++;
}

}
}

for(i=0;i<k/2;i++)
{
cout<<"repeated element "<<temp[i];
}

getch();
}

Is This Answer Correct ?    16 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Find the value of ( 0.75 * 0.75 * 0.75 - 0.001 ) / ( 0.75 * 0.75 - 0.075 + 0.01)?

1538


The perimeter of a rhombus is 52 units. One of its diagonal is 24 units.What is its second diagonals length?

1519


A small town's industries have a total turnover of Rs. 25,00,000. If the town council plans to raise Rs.170,000 through octroi levy, what % levy should it charge on the industries?

1350


Two trains leaving from two station 50 miles away from each other with constant speed of 60 miles per hour, approaches towards each other on different tracks. if length of each train is 1/6 mile. when they meet How much time they need to pass each other totally ?

1419


A chain is broken into three pieces of equal lenths containing 3 links each. It is taken to a backsmith to join into a single continuous one . How many links are to to be opened to make it ?

1429


There are three trucks A, B, C. A loads 10 kg/min. B loads 13 1/3 kg/min. C unloads 5 kg/min. If three simultaneously works then what is the time taken to load 2.4 tones?

1395


Find the physical quantity represented by MOMENTUM * VELOCITY] / [LENGTH * ACCELERATION]?

1192


In a club there are male and female members. If 15 female quit then the number of males will become double the number of males. If 45 males quit no. of female becomes five times the number of males. Find the number of females.

1248


modulo(373,7)+round(5.8)+truncat(7.2)-round(3.4) = ? i exactly don't remember the truncate function.but the function was where we skip the '.' part.

1207


chief : tribe :: governor :

1189


A Lorry starts from Banglore to Mysore At 6.00 a.m, 7.00 a.m, 8.00 a.m.....10 p.m. Similarly another Lorry on another side starts from Mysore to Banglore at 6.00 a.m, 7.00 a.m, 8.00 a.m.....10.00 p.m. A Lorry takes 9 hours to travel from Banglore to Mysore and vice versa.?

1144


two workers can type two pages in two minuets then how many persons can type 18 pages in 6 minuets

1377


plz send Karur Vysya Bank Clerk exam previous model papers to saraphin21@gmail.com....

2214


A, B ans C are three speakers. They have to speak randomly along with another 5 speakers in a function. A has to speak before B and B has to speak before C. What is the probability.

1120


There are 4 boys and 3 girls. What is the probability the boys and girls sit alternately?

1197