Problem 1545. Return area of square
Solution Stats
Problem Comments
-
5 Comments
Show
2 older comments
Adi Zabidi
on 27 Dec 2016
yay
Jyothsna Chintala
on 21 Apr 2020
good
Halie Bien
on 22 Apr 2021
great
James McMichael
on 26 Apr 2021
This was a nice problem
Tom Leyh
on 17 Aug 2021
nice small problem for MATLAB beginners
Solution Comments
-
1 Comment
Jaamir
on 2 Dec 2022
cake walk!
-
1 Comment
Joern Kretschmer
on 5 Sep 2022
This problem would benefit from a bit more explanations.
-
1 Comment
Shawn
on 12 Jul 2022
Nice solution
-
1 Comment
Josh Klueber
on 2 Nov 2021
nice problem
-
1 Comment
john perkins
on 4 May 2021
very concise and useful problem
-
1 Comment
Tatjana Dulinskiene
on 2 Oct 2020
it's good
-
2 Comments
Muhammad Usman
on 26 Apr 2020
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
Ayper Degirmenci
on 13 Jun 2020
function b = area_square(a)
b = a^2;
end
-
1 Comment
Christian Haller
on 12 Jul 2019
Lovely code!
-
1 Comment
nadhirahjasri
on 20 Sep 2017
y
-
2 Comments
Aaron Milburn
on 26 Jan 2020
Very simple
Dyuman Joshi
on 28 Feb 2022
Can't believe someone flagged this
Problem Recent Solvers10569
Suggested Problems
-
3965 Solvers
-
Calculate the area of a triangle between three points
2212 Solvers
-
find the surface area of a cube
464 Solvers
-
705 Solvers
-
765 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!