一、题目;
二、N-S流程图;
三、运行结果;
四、源代码;
# define _CRT_SECURE_NO_WARNINGS
# include <stdio.h>int main()
{//初始化变量值;int a = 0;int n = 0;int i = 0;int result = 0;int tn = 0;//提示用户;printf("请输入a n的值:");//获取用户输入数据;scanf("%d %d", &a, &n);//运算;while (i < n){//改变变量值;tn = tn + a;//运算;result = tn + result;//改变变量值;tn = tn * 10;i++;}//输出结果;printf("结果为:%d", result);return 0;
}