Problem 20. Summing digits

Created by Cody Team in Community

Given n, find the sum of the digits that make up 2^n.


 Input  n = 7
 Output b = 11

since 2^7 = 128, and 1 + 2 + 8 = 11.

Solution Stats

50.85% Correct | 49.15% Incorrect
Last solution submitted on Mar 17, 2019

Problem Comments

Solution Comments

Recent Solvers4369

Suggested Problems

More from this Author95


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!