#include"stdio.h"
int fn(int a,int n)
{ int s;
while(n>=0)
{
s=an+s;
a=a10;
n–;
} r
eturn s;
}
void main()
{ int a1,n1;
int sum;
printf(“please input the a1 and n1:\n”);
scanf("%d%d",&a1,&n1); sum=fn(a1,n1);
printf(“sum=%d\n”,sum);}
2021-02-17
最新推荐文章于 2023-10-11 08:56:51 发布