Create Unique No# Of Three-Digit.
#include <iostream>
using namespace std;
#include<string>
int main()
{
int num = 0;
cout << endl << " Display The Unique
Three-Digit Number's Using This Number (1, 2, 3, 4)." << endl;
cout << "Three-Digit Number's Are:
" << endl;
cout << " ";
for (int d = 1; d
<= 4; d++)
{
for (int s = 1; s
<= 4; s++)
{
for (int v = 1; v <= 4; v++)
{
if (v != d && v != s
&& d != s)
{
num++;
cout << d << s << v << " ";
}
}
}
}
cout << endl << " num Three-Digit-Number Is:
" << num << endl;
system("pause");
}
Comments
Post a Comment