Professional Documents
Culture Documents
#Include Using Namespace STD Int Main (Int Arr (1000), J Int K 0
#Include Using Namespace STD Int Main (Int Arr (1000), J Int K 0
#include <iostream>
int main()
{
int arr[1000],j;
int k=0;
cout << "Program that reads a set of positive integers and outputs how many times a
particular number appears";
cout << " Enter a set of integers (-999 to stop)" << endl;
// to input the integer until we get -999 to stop reading the int value.
do
{
cin>>j;
if(j== -999)
break;
arr[j]++;
k++;
}
while(k<100);
return 0;
}