why I am getting run time error SIGSEGV?

enter code here
#include
#include
#include<math.h>
using namespace std;

int main(){
int test,i,ValueOfCoin,j,temp,difference,k=0,sum=0,count=0;
vector coins;
vector differences;
vector < vector > vec;
cout<<"Input Number of Test cases ";
cin>>test;
int NumberOfCoins;
if(test>=1 && test<=100){
while(test–){
cout<<"Input number of coins ";
cin>>NumberOfCoins;
if(NumberOfCoins>=2 && NumberOfCoins<=100000){
for(i=0;i<NumberOfCoins;i++){
cout<<"Value of coin ";
cin>>ValueOfCoin;
if(ValueOfCoin>=1 && ValueOfCoin<=1000000){
sum=sum+NumberOfCoins;
if(sum<=2000){
coins.push_back(ValueOfCoin);
}
}
else{
count++;
continue;
}
}
}
else{
continue;
}
if(count==NumberOfCoins){
count=0;
cout<<“CONTINUE”<<endl;
continue;
}
if(coins.size()==1){
count=0;
coins.clear();
continue;
}
else{
vec.push_back(coins);
for(j=0;j<coins.size()-1;j++){
for(i=0;i<coins.size()-1;i++){
if(j==i+1){
continue;
}
else{
difference=abs(vec[k][j]-vec[k][i+1]);
differences.push_back(difference);
}
}
}
if(NumberOfCoins>2 && coins.size()>2){
for(i=0;i<differences.size();i++){
for( j=0;j<differences.size()-i-1;j++){
if(differences[j]>differences[j+1]){
temp=differences[j+1];
differences[j+1]=differences[j];
differences[j]=temp;
}
}
}
}
cout<<"min. difference is "<<differences[0]<<endl;
differences.clear();
coins.clear();
k=k+1;
}
}
}
}