Question Number 188362 by mr W last updated on 28/Feb/23

Answered by ARUNG_Brandon_MBU last updated on 28/Feb/23

Commented by ARUNG_Brandon_MBU last updated on 28/Feb/23
#include <iostream>
using namespace std;
int main(void)
{
for (int i0, i1, i2, i3, i4, i=10000; i<100000; i++)
{
i0 = i/10000;
i1 = i%10000/1000;
i2 = i%1000/100;
i3 = i%100/10;
i4 = i%10;
if (i0<i1 && i1<i2 && i2<i3 && i3<i4)
if ((i0+i1+i2+i3+i4) == 20)
cout << i <<", ";
}
return 0;
}
Commented by ARUNG_Brandon_MBU last updated on 28/Feb/23

Commented by mr W last updated on 28/Feb/23

Commented by ARUNG_Brandon_MBU last updated on 28/Feb/23
��
Commented by mr W last updated on 01/Mar/23

Commented by ARUNG_Brandon_MBU last updated on 28/Feb/23
����
Commented by mr W last updated on 04/Mar/23

Commented by ARUNG_Brandon_MBU last updated on 07/Mar/23
// for n > 20
#include <iostream>
using namespace std;
int main(void)
{
for(int i0,i1,i2,i3,i4,i=10000;i<100000;i++)
{
i0 = i/10000;
i1 = i%10000/1000;
i2 = i%1000/100;
i3 = i%100/10;
i4 = i%10;
if (i0<i1 && i1<i2 && i2<i3 && i3<i4)
if (i0+i1+i2+i3+i4 > 20)
cout << i <<" ";
}
return 0;
}
Commented by ARUNG_Brandon_MBU last updated on 07/Mar/23

Commented by ARUNG_Brandon_MBU last updated on 07/Mar/23

Commented by mr W last updated on 07/Mar/23

Answered by mr W last updated on 04/Mar/23

Commented by mr W last updated on 04/Mar/23

Commented by mr W last updated on 04/Mar/23

Commented by mr W last updated on 04/Mar/23
