Tricky Last Digit Write a program that prompts a user for an integer n 0 and determines the last digit of 3n . Hint: The last digit depends on the value n % 4. If x n % 4 , then the last digit of 3 n...

Tricky Last Digit Write a program that prompts a user for an integer n 0 and determines the last digit of 3n . Hint: The last digit depends on the value n % 4. If x n % 4 , then the last digit of 3 n is: 2x3 8 x2 4 x 1 . Note that this problem is simpler to do after you have read Chapter 4.




Dec 07, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers