#include <stdio.h>
void fun(int m, int k, int xx[])
{
int count = 0;
int i = 0;
int j = 0;
int sign = 1;
for (i = m + 1; i < m * m; i++)
//从i开始循环,判断紧靠i的整数
{
for (j = 2; j < i; j++)
{
if (i%j!= 0) //判断i是否为素数
sign = 1;//若是素数,标志设为1
else
{
sign = 0; //若不是素数,标志设为0
break;
}
}
if (sign == 1 && j >= i)
{
if (k >= 0) //判断已有的素数个数是否已经满足sum个
{
xx[count++] = i; //将素数i存入数组xx
k--; //将题目中要求的素数个数减1
}
else
break;
}
}
}
int main()
{
int m, n, zz[1000];
printf("\nPlease enter two integers:");
scanf("%d %d", &m, &n);
fun(m, n, zz);
for (m = 0; m < n; m++)
printf("%d ", zz[m]);
printf("\n");
}
问题 Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type com.sveinn.chatbotdomain.zsxq.service.ZsxqApi available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {ja…