PTA 乙级 1086 就不告诉你

代码实现:

#include

int main(void)
{
	int A, B, Tresult, Rresult;

	scanf("%d %d", &A, &B);

	Tresult = A * B;
	if (Tresult >= 10)
	{
		Rresult = Tresult % 10;
		Tresult /= 10;
		do
		{
			Rresult = Rresult * 10 + Tresult % 10;
			Tresult /= 10;
		} while (Tresult);
	}
	else
		Rresult = Tresult;
	printf("%d", Rresult);

	return 0;
}

你可能感兴趣的:(PTA 乙级 1086 就不告诉你)