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

Learn moreOpportunities for recent engineering grads.

Apply Today**New to MATLAB?**

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

Example

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

43 correct solutions
45 incorrect solutions

Last solution submitted on Jul 02, 2015

1 Comment

Joseph Pauwels
on 13 May 2014

-4 + 3 +1=0 right. I don't remember you saying the absolute value in the instructions.

1 Comment