Master ()
{
int i,n;
int a = 0;
int s = 0;
Printf ("Please enter n:");
scanf("%d ",& ampn);
for(I = 1; I<n+1; i++)
{
a = a * 10+I;
s = s+a;
}
Printf ("Result is %d \n", s);
}
There is a problem. When n is greater than 5, there is a problem with the display. Because it is difficult for C to define a larger number, it is considered to be represented by a string.