#include <iostream>
using namespace std;
int main()
{
//how to make all the output
//in increasing order a,b,c,d where "a" will be smaller than "b"
//and "b" smaller than "c";
for(int a=1;a<30;a++ ){ //for example in this format (a< b),(b<c),(c<d),(d)
for(int b=2;b<40;b++ ){ // example the output 2,4,7,18
for(int c=4;c<50;c++ ){ // where "2" is smaller than "4"
for(int d=10;d<66;d++ ){ //"4" is smaller than "7"
cout<<a<<","<<b<<","<<c<<","<<d<<endl;//"7" is smaller than "18"
}
}
}
}
return 0;
}
This post has been edited by Salem_c: 08 September 2012 - 04:08 AM
Reason for edit:: added [code][/code] tags - learn to use them yourself

New Topic/Question
Reply



MultiQuote





|