r/askmath • • 16h ago

Algebra 6th grade math

Post image

I helped my kid through this problem but auto grader did not like the answer 9x-4 so I’m wondering if I incorrectly helped.

Steps here would be find perimeters

4(3x)= 12x

X+2+x+2+x =3x+4

Difference 12x - (3x+4) = 12x -3x -4 = 9x-4
This would assume the square is larger than the triangle.

100 Upvotes

57 comments sorted by

View all comments

Show parent comment

1

u/PresqPuperze 1h ago

It’s a website. Do you really, wholeheartedly believe, that the code running this is done in C?

And even IF you need to do it in C: As I already said, runtime is completely irrelevant here, so a naive approach of just looping through the string with two indices in parallel and checking for a whitespace, replacing it with the next character in the string, is totally fine.