求符合给定条件的整数集
作者:互联网
#include "pch.h"
#include<stdio.h>
int main()
{
int a,i, j, k;
scanf("%d",&a);
int count = 0;
for (i = a; i <= a + 3; i++) {
for (j = a; j <= a + 3; j++) {
for (k = a; k <= a + 3; k++) {
if(i!=j&&i!=k&&j!=k){
printf("%d%d%d ",i,j,k);
count++;
if (count == 6) {
printf("\n");
count = 0;
}
}
}
}
}
return 0;
}
标签:count,main,int,scanf,整数,pch,给定,符合,include 来源: https://www.cnblogs.com/cznczai/p/11149840.html