#include<stdio.h>
#include<math.h>
int main()
{
int m = 0;
while (scanf("%d", &m) != EOF)
{
int left = m * (m - 1) + 1;
int right = m * (m + 1) - 1;
int arr[1000] = { 0 };
for (int i = 0; i < m; i++)
{
if (left <= right)
{
arr[i] = left;
left += 2;
}
}
for (int i = 0; i < m; i++)
{
printf("%d", arr[i]);
if (i < m - 1)
{
printf("+");
}
}
printf("\n");
}
}
C语言——尼科彻斯定理
最新推荐文章于 2024-07-21 19:50:32 发布