0
Rectangle area
https://www.sololearn.com/compiler-playground/cQ6I0oVFIWJx Write a function that takes two positive integers that represent the length and width of the rectangle. The function calculates the area of the rectangle and returns its result. (Inputs) width = 9 height = 8 (Outputs) 72
3 Réponses
+ 2
https://code.sololearn.com/cMlP1hKolKkU/?ref=app
You're missing the main section of the code.
Do you need to accept inputs or just those two values?
If you need to accept inputs, you can import the Scanner and put that in there.
+ 1
i want to use
public static int area_of_rectangle(int width, int height) {
+ 1
You need the main. You can send the values to your area... and have it return them.
https://www.thoughtco.com/main-class-2034233