Cody

Problem 711. What digit is it?

The function you are being asked to write will take three numbers (n,x,q) as input. The object of the function is to determine what the qth digit (counting from the front) is of n^x.

For example, if the input is whatdigit(3,7,2), your function will need to determine the 2nd digit of 3^7. 3^7=2187, and the 2nd digit is 1. Therefore, the correct output will be y=1.

All digits will be positive integers, and there will always be at least q digits in n^x.

Solution Stats

28.89% Correct | 71.11% Incorrect
Last solution submitted on Nov 21, 2016

Problem Comments

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Join the 15-year community celebration.

Play games and win prizes!

Learn more