#include <stdio.h>
void prnt(int *a, int *b, int *c);

main()
{
	int a = 0, b = 10, c = 0;
	prnt(&a, &b, &c);
	printf("a=%d, b=%d, c=%d\n", a, b, c);
}

void prnt(int *x, int *y, int *z)
{
	while (*x < *y)
	{
		++*x;
		*z += *x;
	}
}