?
2009-08-18 11:36:17 UTC
using namespace std;
int main ()
{
int arr[100], num, sum=0, size=0;
cout<<"Enter an integer: ";
cin>>num;
if (num < 0) num*=-1;
while (num != -999 && size < 100)
{
arr[size]=num;
size++;
cin>>num;
for (int j=1; j
for (int i=0; i
if (arr[i]>arr[i+1])
{
int temp=arr[i];
arr[i]=arr[i+1];
arr[i+1]=temp;
}
}
}
int cont=1;
for (int i=1; i<100; i++)
{
if (arr[i-1]=arr[i])
{
cout<
}
else
{
cont++;
}
cout<
}
return 0;
}
thanx,
buy :)