#include <stdio.h>
#include <stdlib.h>
int lines(int n)
{
if(n==1)
return 2;
else
return n+lines(n-1);
}
int main()
{
int n,m;
printf(“Please enter the number of lines\n”);
scanf("%d",&n);
m=lines(n);
printf(“the number of planes is %d\n”,m);
return 0;
}
N条直线所划分的平面个数
最新推荐文章于 2020-01-13 19:12:28 发布