#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int n,num,i=0,a,b,c,d;
cout <<"Choose n to create a complete graph [3 9]? ";
cin >> n;
cout << "-------------------------------------------------------------------" <<endl;
cout << "verticles:";
for (num=1;num<=n;num++)
cout <<" "<<num << ", ";
cout << "=> Total: " << n <<endl;
cout << "Edges: ";
for (int a=1;a<n;a++)
for(int b=a+1;b<=n;b++){
cout << a<<"-"<<b <<" ";
i++;}
cout << "=> Total: " << i <<endl;
cout << "-------------------------------------------"<<endl;
cout << "All possible maximal matchings:"<<endl;
for (int a=1;a<n;a++)
for(int b=a+1;b<=n;b++)
for(int c=3;c<n;c++)
for(int d=c+1;d<=n;d++)
{cout << a<< "-"<< b<<","<<" "<<c<<"-"<<d<<endl;}
system("pause");
return 0;
}
can someone tell me that how can i skip those lines where the value of c/d=b.