Chatting Area! Have fun! (Part 1)

Yo can’t code in MakeCode c or c++ without using GitHub thingies that are hard to understand

3 Likes

wait yall are learning? im stuck on B L O C K S

11 Likes
#include <stdio.h>

int main() {
    int numbers[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
    int len = sizeof(numbers) / sizeof(numbers[0]);

    int sum = 0;
    for (int i = 0; i < len; i++) {
        sum += numbers[i];
    }

    printf("Average: %.1f\n", (double)sum / len);

    return 0;
}

I think that fixed it? I don’t have a compiler with me at the moment.

2 Likes

yeah, that’s fine, blocks can make some pretty good games, but if you want to go to higher coding, then I suggest learning some sort of typescript.

4 Likes

It would seem so… but who says it can’t be at a later date? I’ve gotta have hope! :laughing:

2 Likes

I believe I see the problem; it’s something I didn’t catch at first either :sob:
Looking at the for loop, I noticed the slightest typo

...
for (i = 0; i < len; i++) {
    sum + Numbers[i];
}
...

What I believe happened is that you forgot to also set the sum variable as well as increase it. Here’s a quick fix:

...
for (i = 0; i < len; i++) {
    sum += Numbers[i];
}
...

Hope this helped!!

3 Likes

I don’t know python and the one time I tried it was somehow too hard for me even though it’s easier :rofl:

4 Likes

then use a custom compiler! (I use Visual Studio (NOT Visual studio code) )

4 Likes

What it should be

2 Likes

I’m back!!!

5 Likes

lol I’m working on learning MakeCode ts

6 Likes

Best of luck with your work

11 Likes

I hate having to replay a whole section of my game just to see one part​:pensive_face:

4 Likes

PFFFFVVVVVVV


WHAAAATTT?!!! I FEEL IT IS LIKE A BETTER VERSION OF MINE!!!

6 Likes

Duration - 5:28

3 Likes

thank you!

1 Like

Just use functions and remove the less important functions like the loading and early stuff and then drag the area of the code directly into the start block

3 Likes

Yo guys I own a roll of unused, undeveloped, unexposed Fujichrome 35mm film

4 Likes

Bro comes out with the most random one liners ever

4 Likes

happy to help!

2 Likes