Problem 1545. Return area of square
Solution Stats
Problem Comments
-
5 Comments
yay
good
great
This was a nice problem
nice small problem for MATLAB beginners
Solution Comments
-
1 Comment
cake walk!
-
1 Comment
This problem would benefit from a bit more explanations.
-
1 Comment
Nice solution
-
1 Comment
nice problem
-
1 Comment
very concise and useful problem
-
1 Comment
it's good
-
2 Comments
function b = area_square()
a = input('Enter the side of square:')
b = sprintf('Area of square is: %f',a*a)
end
What's wrong with it
function b = area_square(a)
b = a^2;
end
-
1 Comment
Lovely code!
-
1 Comment
y
-
2 Comments
Very simple
Can't believe someone flagged this
Problem Recent Solvers10159
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
14599 Solvers
-
Project Euler: Problem 9, Pythagorean numbers
810 Solvers
-
Back to basics 11 - Max Integer
750 Solvers
-
3407 Solvers
-
Find the next Fibonacci number
399 Solvers
More from this Author9
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!