View Code of Problem 91

#include <stdio.h>
int main()
{
	int a,i;
	scanf("%d", &a);
	printf("%d=", a);
	while (a!=1)
	{
		for (i = 2; i <= a; i++)
			if (a % i == 0)
			{
				printf("%d", i);
				if (a / i != 1)
					printf("*");
				else
					printf("\n");
				a /= i;
				break;
			}
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 91