its for idea make is urselfView more random threads:
- STA301 Assignment No.2 (Lessons 9-14) May 6,2010
- cs301 assignment no 3 Solution 20 January 2016
- ISL201 Islamic Studies Assignment No.1 Solution 1st...
- MGMT627 Assignment 2 Solution July 2010
- CS302 Digital & Logic design Assignment No 1 Solution 3rd...
- CS615 Software Project Management Assignment No. 01...
- MTH302 Bussiness Mathematics and Statistics Solution...
- Assignment # 1(Spring 2010) English Comprehension (ENG 101)
- Assignment submission guide line for virtual university...
- ENG-301 Business Communication Assignment 1 solution and...
Sponsored Links
Code:#include<iostream> using namespace std; /*Function*/ int count_repeats(int array2[],int compare_element,int j){ int counter = 0,i; for(i=j;i<10;i++) { if(array2[i]==compare_element) counter++; j--; } return counter; } /*Main Method*/ int main(){ int array1[10],i,j,no_of_repeats; cout<<"Enter the length of the array you want to campre ... ";/*By assingnment set length to 10 time*/ cin>>j; for(i=0;i<j;i++){ cout<<"Enter the Elements : "; cin>>array1[i]; } for(i=0;i<10;i++){ no_of_repeats = count_repeats(array1,array1[i],i); if(no_of_repeats > 1){ cout<<"Element "<<array1[i]<<" repeats:"<<no_of_repeats<<" times \n"; } } return 0; system("pause"); }
There are currently 1 users browsing this thread. (0 members and 1 guests)