輸出一個百位數,1-5之間所有組合型別,數字不重複
#include <stdio.h>
int main(int argc, const char *argv[])
{
int b, s, g;
int count = 0;
for (b = 1; b < 5; b++)
{
for (s = 1; s < 5; s++)
{
for (g = 1; g < 5; g++)
{
if (g != s && g != b && b != s)
{
printf("%d,%d,%d\n", b, s, g);
count **;
}
}
}
}
printf("count = %d\n", count);
return 0;
}