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
From the below mentioned options choose the number that comes to 15 when divided by 4 and added by 9?
Rohan bought some rice at Rs. 10 per kilogram. He buys 2 kg rice from a ration store at the rate of Rs. 8 per kilogram. He mixes the two type of rice and sells at Rs. 11 per kilogram. He makes 25% profit. What is the ratio of non-ration to ration rice?
JSW steel online test questions
If a ball falls from 16 feet takes 4 seconds. How much time it will take when falls fron 64 feets.
It has 20 mixture contains mil and water in the ratio 3:5,replace 4 litres of mixture with 4 litres of water what is the final ratio of milk and water.
A certain quantity of milk is found to be adulterated to the extent of 10%. What proportion of the adulterated milk should be replaced with pure milk to take the purity level to 98%?
i want questions asked in interview
How many people are there in the queue if I am 7th in the queue from either end?
A person meets a train at a railway station coming daily at a particular time . One day he is late by 25 minutes, and he meets the train 5 k.m. before the station. If his speed is 12 kmph, what is the speed of the train.
quants,logical,verbal
In a typical motor cycle rally, every motor cycle has to reach a speed of 20 m/min within a minute and it increase its speed by 20 m/min and the sum was 1600 m/min. Four minutes later, a new motor cyclist started running in the race. After another two minutes, the motor cyclist with the speed of 400 m/min stopped due to injuries and again two new motor cyclist started running in the race. What is the current average speed?
Find the next series: AC CG GO OE ?
2 persons can finish a job in 8 days. First person alone can finish the work in 24 days. How many days does the second person take to finish the job?
There are 150 weights .Some are 1 kg weights and some are 2 kg weights. The sum of the weights is 260.is the number of 1kg weights?
maths