#include<iostream.h>
int main()
{
int num,j,c=0,limit,i,k;
int*freq=new int[];
int*munam=new int[];
cout<<"How many times u want to enter the numbers\n";
cin>>k;
cout<<"tell ur range in which u will enter\n";
cin>>limit;
for( i=0; i<k; i++) {
cout<<"Enter number\t"<<i+1;
cin>>munam[i];
if(num>limit) {
cout<<"invalid num";
return 0;
}
for( j=0; j<limit; j++) {
freq[j]=0;
}
++freq[munam[i]];
}
cout<<"Which no u wanna check :P";
cin>>num;
cout<<"You entered "<<num<<freq[num]<<" times";
delete[]munam;
delete[]freq;
return 0;
}
MUNAM BIN TARIQ 0 Newbie Poster
MUNAM BIN TARIQ 0 Newbie Poster
NP-complete 42 Junior Poster
MUNAM BIN TARIQ 0 Newbie Poster
MUNAM BIN TARIQ 0 Newbie Poster
MUNAM BIN TARIQ 0 Newbie Poster
NP-complete 42 Junior Poster
MUNAM BIN TARIQ 0 Newbie Poster
MUNAM BIN TARIQ 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.