Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in declaring variables of part, why return area test error? #70

Open
labike opened this issue Dec 13, 2024 · 0 comments
Open

in declaring variables of part, why return area test error? #70

labike opened this issue Dec 13, 2024 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@labike
Copy link

labike commented Dec 13, 2024

pub fn calculate_area() -> u32 {
    // TODO: Implement the function here
    // Declare width and height as immutable variables
    // Calculate the area of the rectangle
    // Return the calculated area
    let width: u32 = 10;
    let height: u32 = 5;
    let area: u32 = width * height;
    return area;
}

in declaring variables of part, why return area test error, and not everyone use area? the error from "test_variables"

@labike labike closed this as completed Dec 13, 2024
@labike labike reopened this Dec 13, 2024
@dcodesdev dcodesdev added bug Something isn't working good first issue Good for newcomers labels Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants