#include<iostream.h>
main()
{
int a[10],i,x,f=1,sum=0;
cout<<"Enter An Array Of 10 Element:\n";
for(i=0;i<10;i++)
cin>>a[i];
cout<<"Enter Value You Want To Find:";
cin>>x;
for(i=0;i<10;i++)
if(x==a[i])
{
cout<<"The Value You Want Is Found\n";
for(i=0;i<10;i++)
{
if(x==a[i])
{
sum++;
cout<<"The Location Of The Repeated Value("<<x<<") Is:"<<i<<"\n";
}
}
cout<<"The Value Is Repeated "<<sum<<" Times";
f=0;
break;
}
if(f==1)
cout<<"The Value Is Not Found";
}
لا تنسونا من صالح دعائكم المهندس اوس الخزرجي
main()
{
int a[10],i,x,f=1,sum=0;
cout<<"Enter An Array Of 10 Element:\n";
for(i=0;i<10;i++)
cin>>a[i];
cout<<"Enter Value You Want To Find:";
cin>>x;
for(i=0;i<10;i++)
if(x==a[i])
{
cout<<"The Value You Want Is Found\n";
for(i=0;i<10;i++)
{
if(x==a[i])
{
sum++;
cout<<"The Location Of The Repeated Value("<<x<<") Is:"<<i<<"\n";
}
}
cout<<"The Value Is Repeated "<<sum<<" Times";
f=0;
break;
}
if(f==1)
cout<<"The Value Is Not Found";
}
لا تنسونا من صالح دعائكم المهندس اوس الخزرجي