% combinaçoes n 2 a 2
clc
clear all

n=4;
counter=1;
for j= 1 : n
    for i=j : (n-1)
        combinacoes(counter,:)=[j i+1]
        counter=counter+1;
    end
end