Problem 2274. Find the square of the sum of the digits of a number

If a number (n) is provided as an input, find the square of the sum of the digits of the number.


If n = 21, the answer will be square of (2 + 1) = 9

Solution Stats

44.35% Correct | 55.65% Incorrect
Last solution submitted on Oct 09, 2016

Problem Comments

Solution 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