Welcome to Incels.is - Involuntary Celibate Forum

Welcome! This is a forum for involuntary celibates: people who lack a significant other. Are you lonely and wish you had someone in your life? You're not alone! Join our forum and talk to people just like you.

Programming Course: Lesson 0 - WELCOME

Knajjd

Knajjd

Major
★★★★★
Joined
Sep 2, 2021
Posts
2,043
This course is aimed at members who would like to learn how to program.

These short, simple, step-by-step lessons will teach you important core ideas. Even though the lessons will seem simple, please do not dismiss them out of hand. These essential core ideas will give you a solid foundation from which you can build.

Lessons to be published weekly. Lesson 1 will be available on the 5th July 2023.

@Caesercel
@based_meme
@Savage
 
C++:
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <windows.h>
#include <conio.h>
#include <ctype.h>
#include <process.h>
#define UP 72
#define DOWN 80
#define LEFT 75
#define RIGHT 77
typedef struct coordonnes coordonnes;
struct coordonnes
{
    int direction;
    int x;
    int y;
};
coordonnes tete, tour[500], apa, corps[30];
int len;
char ns;
int vie;
void load();
int langeur;
int alongation;
void record();
void Move();
void apat();
int Score();
int scooore();
void afficher();
int speed;
void xy(int x, int y);
void allerxy(int x, int y);
void tourner();
void mur();
void bas();
void gauche();
void haut();
void droit();
void quiter();
void afficher()
{
    printf("instructions:\n");
    printf("\n-> Utilisez les fleches pour deplacer le serpent.\n\n-> Vous recevrez des aliments aux differentes coordonnees de l'ecran que vous devrez manger. Chaque fois que vous mangez un aliment la longueur du serpent sera augmentee d'un element.\n\n->Votre vie diminuera lorsque vous frapperez le mur ou le corps du serpent.\n\n-> Vous pouvez mettre le jeu en pause en son milieu en appuyant sur P. Pour continuer le jeu en pause appuyez à nouveau sur n'importe quelle autre nd\n\n-> Si vous voulez quitter appuyez sur esc\n");
    int r;
    printf("selectionner la difficulté et clicker deux foix sur entrer \n");
    printf("1.difficile \n 2.mediume\n 3.facile \n ");
    scanf("%d", &r);
    if (r == 1) {
        speed = 25;
    }
    else if (r == 2) {
        speed = 55;
    else {
        speed = 100;
    }
    if (getch() == 27)
        exit(0);
}
void Move()
Show quoted text
    ns = getch();
    if ((ns == LEFT && tete.direction != RIGHT && tete.direction !=LEFT) || (ns == UP && tete.direction != DOWN && tete.direction != UP)|| (ns == RIGHT && tete.direction != LEFT && tete.direction != RIGHT) || (ns == DOWN && tete.direction != UP && tete.direction != DOWN))
    {
        alongation++;
        tour[alongation] = tete;
        tete.direction = ns;
        if (ns == RIGHT)
            tete.x+;
        if (ns == UP
            tete.y--;
        if (ns == LEFT)
            tete.x--;
        if (ns == DOWN)
            tete.y++;
        Move();
    }
    else
    {
        printf("\a");
        Move();
    }}
void xy(int x, int y)
{
    COORD coord;
    coord.X = x;
    coord.Y = y;
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}
void allerxy(int x, int y)
{
    HANDLE a;
    COORD b;
    fflush(stdout);
    b.X = x;
    b.Y = y;
    a = GetStdHandle(STD_OUTPUT_HANDLE);
    SetConsoleCursorPosition(a, b);
}
void load()
{
    int row, col, i, j, q;
    xy(36, 14);
    printf("t'es pres?");
    xy(30, 15);
 
    for (i = 1; i <= 20; i++)
    {
        for (j = 0; j <= 10000000; j++)
            ;
        printf("%c", 177);
    }
    getch();
}
void quiter()
{
    int i, verf = 0;
    for (i = 4; i < langeur; i++)
    {
        if (corps[0].x == corps[i].x && corps[0].y == corps[i].y)
        {
            verf++;
        }
        if (i == langeur || verf != 0)
            break;
    }
    if (tete.x <= 10 || tete.x >= 70 || tete.y <= 10 || tete.y >= 30
        || verf != 0)
    {
        vie--;
        if (vie >= 0)
        {
            system("cls");
            mur();
            tete.x = 25;
            tete.y = 20;
            alongation = 0;
            tete.direction = RIGHT;
            Move();
        }
        else
        {
            system("cls");
            printf("game over\n");
            record();
            exit(0);
        }
    }
void apat()
{
    if (tete.x == apa.x && tete.y == apa.y)
    {
        langeur++;
        time_t a;
        a = time(0);
        srand(a);
        apa.x = rand() % 70;
        if (apa.x <= 10)
            apa.x += 11;
        apa.y = rand() % 30;
        if (apa.y <= 10)
            apa.y += 11;
    }
    else if (apa.x == 0)
    {
        apa.x = rand() % 70;
        if (apa.x <= 10)
            apa.x += 11;
        apa.y = rand() % 30;
        if (apa.y <= 10)
            apa.y += 11;
    }
}
 
void bas()
{
    int i;
    for (i = 0; i <= (tete.y - tour[alongation].y) && len < langeur; i++)
    {
        allerxy(tete.x, tete.y - i);
        {
            if (len == 0
                printf("v");
            else
                printf("*");
        }
        corps[len].x = tete.x;
        corps[len].y = tete.y - i;
        len++;
    }
    tourner();
    if (!kbhit())
        tete.y++;
}
 
void gauche()
{
    int i;
    for (i = 0; i <= (tour[alongation].x - tete.x) && len < langeur; i++)
    {
        allerxy((tete.x + i), tete.y);
        {
            if (len == 0)
                printf("<");
            else
                printf("*");
        }
        corps[len].x = tete.x + i;
        corps[len].y = tete.y;
        len++;
    }
    tourner();
    if (!kbhit())
        tete.x--;
}
void droit()
{
    int i;
    for (i = 0; i <= (tete.x - tour[alongation].x) && len < langeur; i++)
    {
        corps[len].x = tete.x - i;
        corps[len].y = tete.y;
        allerxy(corps[len].x, corps[len].y);
        {
            if (len == 0)
                printf(">");
            else
                printf("*");
        }
 
        len++;
    }
    tourner();
    if (!kbhit())
        tete.x++;
}
void haut()
{
    int i;
    for (i = 0; i <= (tour[alongation].y - tete.y) && len < langeur; i++)
    {
        allerxy(tete.x, tete.y + i);
        {
            if (len == 0)
                printf("^");
            else
                printf("*");
        }
        corps[len].x = tete.x;
        corps[len].y = tete.y + i;
        len++;
    }
    tourner();
    if (!kbhit()

        tete.y--;
}
void tourner()
{
    int i, j, diff, x, y;
    for (i = alongation; len < langeur && i >= 0 ; i--)
    {
        if (tour[i].x == tour[i - 1].x)
        {
            diff = tour[i].y - tour[i - 1].y;
            if (diff < 0)
                for (j = 1; j <= (-diff); j++)
                {
                    corps[len].x = tour[i].x;
                    corps[len].y = tour[i].y + j;
                    allerxy(corps[len].x, corps[len].y);
                    printf("*");
                    len++;
                    if (len == langeur)
                        j=-diff+1;
                }
            else if (diff > 0)
                for (j = 1; j <= diff; j++)
                {
 
                    corps[len].x = tour[i].x;
                    corps[len].y = tour[i].y - j;
                    allerxy(corps[len].x, corps[len].y);
                    printf("*");
                    len++;
                    if (len == langeur)
                        j=diff+1;
                }
        }
        else if (tour[i].y == tour[i - 1].y)
        {
            diff = tour[i].x - tour[i - 1].x;
            if (diff < 0)
                for (j = 1; j <= (-diff) && len < langeur; j++)
                {
 
                    corps[len].x = tour[i].x + j;
                    corps[len].y = tour[i].y;
                    allerxy(cors[len].x, corps[len].y);

                    printf("*");
                    len++;
                    if (len == langeur)
                        j=-diff+1;
                }
            else if (diff > 0)
                for (j = 1; j <= diff && len < langeur; j++)
                {
 
                    corps[len].x = tour[i].x - j;
                    corps[len].y = tour[i].y;
                    allerxy(corps[len].x, corps[len].y);
                    printf("*");
                    len++;
                    if (len == langeur)
                        j=diff+1;
                }
       }
    }
    x = corps[langeur - 1].x;
    y = corps[laneur - 1].y;
    allerxy(x, y);
}
void mur()
{
    int i;
    allerxy(apa.x, apa.y);
    printf("*");
    for (i = 10; i < 71; i++)
    {
        allerxy(i, 10);
        printf("+");
        allerxy(i, 30);
        printf("+");
    }
    for (i = 10; i < 31; i++)
    {
        allerxy(10, i);
        printf("+");
        allerxy(70, i);
        printf("+");
    }
}
int Score()
    int score;
    allerxy(20, 8);
    score = langeur - 3;
    printf("SCORE : %d", score);
    allerxy(50, 8);
    printf("Life : %d", vie);
    return score;
}
int scooore()
{
    int score = Score();
    system("cls");
    return score;
}
void record()
{
    char nj[20], nnj[20], rep, c;
    int i, j, px;
    FILE* info;
    info = fopen("record.txt", "a+");
    getch();
    system("cls");
    printf("Enter your name\n");
    scanf("%[^\n]",nj);
    for (j = 0;nj[j] != '\0'; j++)
    {
        nnj[0] = toupper(nj[0]);
        if (nj[j - 1] == ' ')
        {
            nnj[j] = toupper(nj[j]);
            nnj[j - 1] =nj[j - 1];
        }
        else
            nnj[j] =nj[j];
    }
    nnj[j] = '\0';
    fprintf(info, "nom joueur :%s\n", nnj);
    time_t mytime;
    mytime = time(NULL);
    fprintf(info, " Date:%s", ctime(&mytime));

    fprintf(info, "Score:%d\n", px = langeur - 5);
    for (i = 0; i <= 50; i++)
        fprintf(info, "%c", '_');
    fprintf(info, "\n");
    fclose(info);
    printf("voullez voir les autres record? 'oui'\n");
    rep = getch();
    system("cls");
    if (rep == "oui")
    {
        info = fopen("record.txt", "r");
        do
        {
            putchar(c = getc(info));
        } while (c != EOF);
   }
    fclose(info);
}
void main()
{
    char ns;
    afficher();
    system("cls");
    load();
    system("cls");
    langeur = 3;
    tete.x = 25;
    tete.y = 20;
    tete.direction = RIGHT;
    mur();
    apat();
    vie = 5;
    tour[0] = tete;
    Move();
Sent from Mail for Windows
Show quoted text
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <windows.h>
#include <conio.h>
#include <ctype.h>
#include <process.h>
#define UP 72
#define DOWN 80
#define LEFT 75
#define RIGHT 77
typedef struct coordonnes coordonnes;
truct coordonnes
{
    int direction;
    int x
    int y;
};
coordonnes tete, tour[500], apa, corps[30];
int len;
char ns;
int vie;
void load();
int langeur;
int alongation;
void record();
void Move();
void apat();
int Score();
int scooore();
void affiher();
int speed;
void xy(int x, int y);
void allerxy(int x, int y);
void tourner();
void mur();
void bas();
void gauche();
void haut();
void droit();
void quiter();
void afficher()
{
    printf("instructions:\n");
    printf("\n-> Utilisez les fleches pour deplacer le serpent.\n\n-> Vous recevrez des aliments aux differentes coordonnees de l'ecran que vous devrez manger. Chaque fois que vous mangez un aliment la longueur du serpent sera augmentee d'un element.\n\n->Votre vie diminuera lorsque vous frapperez le mur ou le corps du serpent.\n\n-> Vous pouvez mettre le jeu en pause en son milieu en appuyant sur P. Pour continuer le jeu en pause appuyez à nouveau sur n'importe quelle autre nd\n\n-> Si vous voulez quitter appuyez sur esc\n");
    int r;
    printf("selectionner la difficulté et clicker deux foix sur entrer \n");
    printf("1.difficile \n 2.mediume\n 3.facile \n ");
    scanf("%d", &r);
    if (r == 1) {
        speed = 25;
    }
    else if (r == ) {
        speed = 55;
    }
    else {
        speed = 100;
    }
    if (getch() == 27)
        exit(0);
void Move()
Show quoted tex
    ns = getch();
    if ((ns == LEFT && tete.direction != RIGHT && tete.direction !=LEFT) || (ns == UP && tete.direction != DOWN && tete.direction != UP)|| (ns == RIGHT && tete.direction != LEFT && tete.direction != RIGHT) || (ns == DOWN && tete.direction != UP && tete.direction != DOWN))
    {
        alongation++;
        tour[alongation] = tete;
        tete.direction = ns;
 
        if (ns == RIGHT)
            tete.x++;
        if (ns == UP)
            tete.y--;
        if (ns == LEFT)
            tete.x--;
        if (ns == DOWN)
            tete.y++;
        Move();
    }
    else
    {
        printf("\a");
        Move();
    }
}
void xy(int x, int y)
{
    COORD coord;
    coord.X = x;
    coord.Y = y;
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}
void allerxy(int x, int y)
{
    HANDLE a;
    COORD b
    fflush(tdout);
    b.X = x;
    b.Y = y;
    a = GetStdHandle(STD_OUTPUT_HANDLE);
    SetConsoleCursorPosition(a, b);
}
void load()
{
    int row, col, i, j, q;
    xy(36, 14);
    printf("t'es pres?");
    xy(30, 15);
 
    or (i = 1; i <= 20; i++)
    {
        for (j = 0; j <= 10000000; j++)
            ;
        printf("%c", 177);
    }
    getch();
}
void quiter()
{
    int i, verf = 0;
    for (i = 4; i < langeur; i++)
    {
        if (corps[0].x == corps[i].x && corps[0].y == corps[i].y)
        {
            verf++;
        }
        if (i == langeur || verf != 0)
            break;
    }
    if (tete.x <= 10 || tete.x >= 70 || tete.y <= 10 || tete.y >= 30
        || verf != 0)
    {
        vie--;
        if (vie >= 0)
        {
            system("cls");
            mur();
            tete.x = 25;
            tete.y = 20;
            alongation = 0;
            tete.direction = RIGHT;
            Move();
        }
        else
        {
            system("cls");
            printf("game over\n");
            record();
            exit(0);
        }
    }
}
void apat()
{
    if (tete.x == apa.x && tete.y == apa.y)
    {
        langeur++;
        time_t a;
        a = time(0);
        srand(a);
        apa.x = rand() % 70;
        if (apa.x <= 10)
            apa.x += 11;
        apa.y = rand() % 30;
        if (apa.y <= 10)
            apa.y += 11;
    }
    else if (apa.x == 0)
    {
        apa.x = rand() % 70;
        if (apa.x <= 10)
            apa.x += 11;
        apa.y = rand() % 30;
        if (apa.y <= 10)
            apa.y += 11;
    }
}
void bas()
{
    int i;
    for (i = 0; i <= (tete.y - tour[alongation].y) && len < langeur; i++)
    {
        allerxy(tete.x, tete.y - i);
        {
            if (len == 0)
                printf("v");
            else
                printf("*");
        }
        corps[len].x = tete.x;
        corps[len].y = tete.y - i;
        len++;
    }
    tourner();
    if (!kbhit())
        tete.y++;
}
void gauche()
{
    int i;
    for (i = 0; i <= (tour[alongation].x - tete.x) && len < langeur; i++)
    {
        allerxy((tete.x + i), tete.y);
        {
            if (len == 0)
                printf("<");
            else
                printf("*");
        }
        corps[len].x = tete.x + i;
        corps[len].y = tete.y;
        len++;
    }
    tourner();
    if (!kbhit())
       tete.x--;

}
void droit()
{
    int i;
    for (i = 0; i <= (tete.x - tour[alongation].x) && len < langeur; i++)
    {
        corps[len].x = tete.x - i;
        corps[len].y = tete.y;
        allerxy(corps[len].x, corps[len].y);
        {
            if (len == 0)
                printf(">");
            else
                printf("*");
        }
 
        len++;
    }
    tourner();
    if (!kbhit())
        tete.x++;
void haut()
{
    int i;
    for (i = 0; i <= (tour[alongation].y - tete.y) && len < langeur; i++)
    {
        allerxy(tete.x, tete.y + i);
        {
            if (len == 0)
                printf("^");
            else
                printf("*");
        }
        corps[len].x = tete.x;
        corps[len].y = tete.y + i;
        len++;
    }
    tourner();
    if (!kbhit())
       tete.y--;

}
void tourner()
{
    int i, j, diff, x, y;
    for (i = alongation; len < langeur && i >= 0 ; i--)
    {
        if (tour[i].x == tour[i - 1].x)
        {
            diff = tour[i].y - tour[i - 1].y;
            if (diff < 0)
                for (j = 1; j <= (-diff); j++)
                {
                    corps[len].x = tour[i].x;
                    corps[len].y = tour[i].y + j;
                    allerxy(corps[len].x, corps[len].y);
                    printf("*");
                    len++;
                    if (len == langeur)
                        j=-diff+1;
                }
            else if (diff > 0)
                for (j = 1; j <= diff; j++)
                {
 
                    corps[len].x = tour[i].x;
                    corps[len].y = tour[i].y - j;
                    allerxy(corps[len].x, corps[len].y);
                    printf("*");
                    len++;
                    if (len == langeur)
                        j=diff+1;
                }
        }
        else if (tour[i].y == tour[i - 1].y)
        {
            diff = tour[i].x - tour[i - 1].x;
            if (diff < 0)
                for (j = 1; j <= (-diff) && len < langeur; j++)
                {
 
                    corps[len].x = tour[i].x + j;
                    corps[len].y = tour[i].y;
                    allerxy(corps[len].x, corps[len].y);
                    printf("*");
                    len++;
                    if (len == langeur)
                        j=-diff+1;
                }
            else if (diff > 0)
                for (j = 1; j <= diff && len < langeur; j++)
                {
 
                    corps[len].x = tour[i].x - j;
                    corps[len].y = tour[i].y;
                    allerxy(corps[len].x, corps[len].y);
                    printf("*");
                    len++;
                    if (len == langeur)
                        j=diff+1;
                }
       }
    }
    x = corps[langeur - 1].x;
    y = corps[langeur - 1].y;
    allerxy(x, y);
}
void mur()
{
    int i;
    allerxy(apa.x, apa.y);
    printf("*");
    for (i = 10; i < 71; i++)
    {
        allerxy(i, 10);
        printf("+");
        allerxy(i, 30);
        printf("+");
    }
    for (i = 10; i < 31; i++)
    {
        allerxy(10, i);
        printf("+");
        allerxy(70, i);
        printf("+");
    }
}
int Score()
{
    int score;
    allerxy(20, 8);
    score = langeur - 3

    printf("SCORE : %d", score);
    allerxy(50, 8);
    printf("Life : %d", vie);
    return score;
}
int scooore()
{
    int score = Score();
    system("cls");
    return score;
}
void record()
{
    char nj[20], nnj[20], rep, c;
    int i, j, px;
    FILE* info;
    info = fopen("record.txt", "a+");
    getch();
    system("cls");
    printf("Enter your name\n");
    scanf("%[^\n]",nj);
    for (j = 0;nj[j] != '\0'; j++)
    {
        nnj[0] = toupper(nj[0]);
        if (nj[j - 1] == ' ')
        {
            nnj[j] = toupper(nj[j]);
            nnj[j - 1] =nj[j - 1];
        }
        else
            nnj[j] =nj[j];
    }
    nnj[j] = '\0';
    fprintf(info, "nom joueur :%s\n", nnj);
    time_t mytime;
    mytime = time(NULL);
    fprintf(info, " Date:%s", ctime(&mytime));
    fprintf(info, "Score:%d\n", px = langeur - 5);
    for (i = 0; i <= 50; i++)
        fprintf(info, "%c", '_');
    fprintf(info, "\n");
    fclose(info);
    printf("voullez voir les autres record? 'oui'\n");
    rep = getch();
    system("cls");
    if (rep == "oui")
    {
        info = fopen("record.txt", "r");
        do
        {
            putchar(c = getc(info));
        } while (c != EOF);
    }
    fclose(info);
}
 
void main()
{
    char ns;
    afficher();
    system("cls");
    load();
    system("cls");
    langeur = 3;
    tete.x = 25;
    tete.y = 20;
    tete.direction = RIGHT;
    mur();
    apat();
    vie = 5;
    tour[0] = tete;
    Move();
}
 
C++:
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <windows.h>
#include <conio.h>
#include <ctype.h>
#include <process.h>
#define UP 72
#define DOWN 80
#define LEFT 75
#define RIGHT 77
typedef struct coordonnes coordonnes;
struct coordonnes
{
    int direction;
    int x;
    int y;
};
coordonnes tete, tour[500], apa, corps[30];
int len;
char ns;
int vie;
void load();
int langeur;
int alongation;
void record();
void Move();
void apat();
int Score();
int scooore();
void afficher();
int speed;
void xy(int x, int y);
void allerxy(int x, int y);
void tourner();
void mur();
void bas();
void gauche();
void haut();
void droit();
void quiter();
void afficher()
{
    printf("instructions:\n");
    printf("\n-> Utilisez les fleches pour deplacer le serpent.\n\n-> Vous recevrez des aliments aux differentes coordonnees de l'ecran que vous devrez manger. Chaque fois que vous mangez un aliment la longueur du serpent sera augmentee d'un element.\n\n->Votre vie diminuera lorsque vous frapperez le mur ou le corps du serpent.\n\n-> Vous pouvez mettre le jeu en pause en son milieu en appuyant sur P. Pour continuer le jeu en pause appuyez à nouveau sur n'importe quelle autre nd\n\n-> Si vous voulez quitter appuyez sur esc\n");
    int r;
    printf("selectionner la difficulté et clicker deux foix sur entrer \n");
    printf("1.difficile \n 2.mediume\n 3.facile \n ");
    scanf("%d", &r);
    if (r == 1) {
        speed = 25;
    }
    else if (r == 2) {
        speed = 55;
    else {
        speed = 100;
    }
    if (getch() == 27)
        exit(0);
}
void Move()
Show quoted text
    ns = getch();
    if ((ns == LEFT && tete.direction != RIGHT && tete.direction !=LEFT) || (ns == UP && tete.direction != DOWN && tete.direction != UP)|| (ns == RIGHT && tete.direction != LEFT && tete.direction != RIGHT) || (ns == DOWN && tete.direction != UP && tete.direction != DOWN))
    {
        alongation++;
        tour[alongation] = tete;
        tete.direction = ns;
        if (ns == RIGHT)
            tete.x+;
        if (ns == UP
            tete.y--;
        if (ns == LEFT)
            tete.x--;
        if (ns == DOWN)
            tete.y++;
        Move();
    }
    else
    {
        printf("\a");
        Move();
    }}
void xy(int x, int y)
{
    COORD coord;
    coord.X = x;
    coord.Y = y;
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}
void allerxy(int x, int y)
{
    HANDLE a;
    COORD b;
    fflush(stdout);
    b.X = x;
    b.Y = y;
    a = GetStdHandle(STD_OUTPUT_HANDLE);
    SetConsoleCursorPosition(a, b);
}
void load()
{
    int row, col, i, j, q;
    xy(36, 14);
    printf("t'es pres?");
    xy(30, 15);
 
    for (i = 1; i <= 20; i++)
    {
        for (j = 0; j <= 10000000; j++)
            ;
        printf("%c", 177);
    }
    getch();
}
void quiter()
{
    int i, verf = 0;
    for (i = 4; i < langeur; i++)
    {
        if (corps[0].x == corps[i].x && corps[0].y == corps[i].y)
        {
            verf++;
        }
        if (i == langeur || verf != 0)
            break;
    }
    if (tete.x <= 10 || tete.x >= 70 || tete.y <= 10 || tete.y >= 30
        || verf != 0)
    {
        vie--;
        if (vie >= 0)
        {
            system("cls");
            mur();
            tete.x = 25;
            tete.y = 20;
            alongation = 0;
            tete.direction = RIGHT;
            Move();
        }
        else
        {
            system("cls");
            printf("game over\n");
            record();
            exit(0);
        }
    }
void apat()
{
    if (tete.x == apa.x && tete.y == apa.y)
    {
        langeur++;
        time_t a;
        a = time(0);
        srand(a);
        apa.x = rand() % 70;
        if (apa.x <= 10)
            apa.x += 11;
        apa.y = rand() % 30;
        if (apa.y <= 10)
            apa.y += 11;
    }
    else if (apa.x == 0)
    {
        apa.x = rand() % 70;
        if (apa.x <= 10)
            apa.x += 11;
        apa.y = rand() % 30;
        if (apa.y <= 10)
            apa.y += 11;
    }
}
 
void bas()
{
    int i;
    for (i = 0; i <= (tete.y - tour[alongation].y) && len < langeur; i++)
    {
        allerxy(tete.x, tete.y - i);
        {
            if (len == 0
                printf("v");
            else
                printf("*");
        }
        corps[len].x = tete.x;
        corps[len].y = tete.y - i;
        len++;
    }
    tourner();
    if (!kbhit())
        tete.y++;
}
 
void gauche()
{
    int i;
    for (i = 0; i <= (tour[alongation].x - tete.x) && len < langeur; i++)
    {
        allerxy((tete.x + i), tete.y);
        {
            if (len == 0)
                printf("<");
            else
                printf("*");
        }
        corps[len].x = tete.x + i;
        corps[len].y = tete.y;
        len++;
    }
    tourner();
    if (!kbhit())
        tete.x--;
}
void droit()
{
    int i;
    for (i = 0; i <= (tete.x - tour[alongation].x) && len < langeur; i++)
    {
        corps[len].x = tete.x - i;
        corps[len].y = tete.y;
        allerxy(corps[len].x, corps[len].y);
        {
            if (len == 0)
                printf(">");
            else
                printf("*");
        }
 
        len++;
    }
    tourner();
    if (!kbhit())
        tete.x++;
}
void haut()
{
    int i;
    for (i = 0; i <= (tour[alongation].y - tete.y) && len < langeur; i++)
    {
        allerxy(tete.x, tete.y + i);
        {
            if (len == 0)
                printf("^");
            else
                printf("*");
        }
        corps[len].x = tete.x;
        corps[len].y = tete.y + i;
        len++;
    }
    tourner();
    if (!kbhit()

        tete.y--;
}
void tourner()
{
    int i, j, diff, x, y;
    for (i = alongation; len < langeur && i >= 0 ; i--)
    {
        if (tour[i].x == tour[i - 1].x)
        {
            diff = tour[i].y - tour[i - 1].y;
            if (diff < 0)
                for (j = 1; j <= (-diff); j++)
                {
                    corps[len].x = tour[i].x;
                    corps[len].y = tour[i].y + j;
                    allerxy(corps[len].x, corps[len].y);
                    printf("*");
                    len++;
                    if (len == langeur)
                        j=-diff+1;
                }
            else if (diff > 0)
                for (j = 1; j <= diff; j++)
                {
 
                    corps[len].x = tour[i].x;
                    corps[len].y = tour[i].y - j;
                    allerxy(corps[len].x, corps[len].y);
                    printf("*");
                    len++;
                    if (len == langeur)
                        j=diff+1;
                }
        }
        else if (tour[i].y == tour[i - 1].y)
        {
            diff = tour[i].x - tour[i - 1].x;
            if (diff < 0)
                for (j = 1; j <= (-diff) && len < langeur; j++)
                {
 
                    corps[len].x = tour[i].x + j;
                    corps[len].y = tour[i].y;
                    allerxy(cors[len].x, corps[len].y);

                    printf("*");
                    len++;
                    if (len == langeur)
                        j=-diff+1;
                }
            else if (diff > 0)
                for (j = 1; j <= diff && len < langeur; j++)
                {
 
                    corps[len].x = tour[i].x - j;
                    corps[len].y = tour[i].y;
                    allerxy(corps[len].x, corps[len].y);
                    printf("*");
                    len++;
                    if (len == langeur)
                        j=diff+1;
                }
       }
    }
    x = corps[langeur - 1].x;
    y = corps[laneur - 1].y;
    allerxy(x, y);
}
void mur()
{
    int i;
    allerxy(apa.x, apa.y);
    printf("*");
    for (i = 10; i < 71; i++)
    {
        allerxy(i, 10);
        printf("+");
        allerxy(i, 30);
        printf("+");
    }
    for (i = 10; i < 31; i++)
    {
        allerxy(10, i);
        printf("+");
        allerxy(70, i);
        printf("+");
    }
}
int Score()
    int score;
    allerxy(20, 8);
    score = langeur - 3;
    printf("SCORE : %d", score);
    allerxy(50, 8);
    printf("Life : %d", vie);
    return score;
}
int scooore()
{
    int score = Score();
    system("cls");
    return score;
}
void record()
{
    char nj[20], nnj[20], rep, c;
    int i, j, px;
    FILE* info;
    info = fopen("record.txt", "a+");
    getch();
    system("cls");
    printf("Enter your name\n");
    scanf("%[^\n]",nj);
    for (j = 0;nj[j] != '\0'; j++)
    {
        nnj[0] = toupper(nj[0]);
        if (nj[j - 1] == ' ')
        {
            nnj[j] = toupper(nj[j]);
            nnj[j - 1] =nj[j - 1];
        }
        else
            nnj[j] =nj[j];
    }
    nnj[j] = '\0';
    fprintf(info, "nom joueur :%s\n", nnj);
    time_t mytime;
    mytime = time(NULL);
    fprintf(info, " Date:%s", ctime(&mytime));

    fprintf(info, "Score:%d\n", px = langeur - 5);
    for (i = 0; i <= 50; i++)
        fprintf(info, "%c", '_');
    fprintf(info, "\n");
    fclose(info);
    printf("voullez voir les autres record? 'oui'\n");
    rep = getch();
    system("cls");
    if (rep == "oui")
    {
        info = fopen("record.txt", "r");
        do
        {
            putchar(c = getc(info));
        } while (c != EOF);
   }
    fclose(info);
}
void main()
{
    char ns;
    afficher();
    system("cls");
    load();
    system("cls");
    langeur = 3;
    tete.x = 25;
    tete.y = 20;
    tete.direction = RIGHT;
    mur();
    apat();
    vie = 5;
    tour[0] = tete;
    Move();
Sent from Mail for Windows
Show quoted text
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <windows.h>
#include <conio.h>
#include <ctype.h>
#include <process.h>
#define UP 72
#define DOWN 80
#define LEFT 75
#define RIGHT 77
typedef struct coordonnes coordonnes;
truct coordonnes
{
    int direction;
    int x
    int y;
};
coordonnes tete, tour[500], apa, corps[30];
int len;
char ns;
int vie;
void load();
int langeur;
int alongation;
void record();
void Move();
void apat();
int Score();
int scooore();
void affiher();
int speed;
void xy(int x, int y);
void allerxy(int x, int y);
void tourner();
void mur();
void bas();
void gauche();
void haut();
void droit();
void quiter();
void afficher()
{
    printf("instructions:\n");
    printf("\n-> Utilisez les fleches pour deplacer le serpent.\n\n-> Vous recevrez des aliments aux differentes coordonnees de l'ecran que vous devrez manger. Chaque fois que vous mangez un aliment la longueur du serpent sera augmentee d'un element.\n\n->Votre vie diminuera lorsque vous frapperez le mur ou le corps du serpent.\n\n-> Vous pouvez mettre le jeu en pause en son milieu en appuyant sur P. Pour continuer le jeu en pause appuyez à nouveau sur n'importe quelle autre nd\n\n-> Si vous voulez quitter appuyez sur esc\n");
    int r;
    printf("selectionner la difficulté et clicker deux foix sur entrer \n");
    printf("1.difficile \n 2.mediume\n 3.facile \n ");
    scanf("%d", &r);
    if (r == 1) {
        speed = 25;
    }
    else if (r == ) {
        speed = 55;
    }
    else {
        speed = 100;
    }
    if (getch() == 27)
        exit(0);
void Move()
Show quoted tex
    ns = getch();
    if ((ns == LEFT && tete.direction != RIGHT && tete.direction !=LEFT) || (ns == UP && tete.direction != DOWN && tete.direction != UP)|| (ns == RIGHT && tete.direction != LEFT && tete.direction != RIGHT) || (ns == DOWN && tete.direction != UP && tete.direction != DOWN))
    {
        alongation++;
        tour[alongation] = tete;
        tete.direction = ns;
 
        if (ns == RIGHT)
            tete.x++;
        if (ns == UP)
            tete.y--;
        if (ns == LEFT)
            tete.x--;
        if (ns == DOWN)
            tete.y++;
        Move();
    }
    else
    {
        printf("\a");
        Move();
    }
}
void xy(int x, int y)
{
    COORD coord;
    coord.X = x;
    coord.Y = y;
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}
void allerxy(int x, int y)
{
    HANDLE a;
    COORD b
    fflush(tdout);
    b.X = x;
    b.Y = y;
    a = GetStdHandle(STD_OUTPUT_HANDLE);
    SetConsoleCursorPosition(a, b);
}
void load()
{
    int row, col, i, j, q;
    xy(36, 14);
    printf("t'es pres?");
    xy(30, 15);
 
    or (i = 1; i <= 20; i++)
    {
        for (j = 0; j <= 10000000; j++)
            ;
        printf("%c", 177);
    }
    getch();
}
void quiter()
{
    int i, verf = 0;
    for (i = 4; i < langeur; i++)
    {
        if (corps[0].x == corps[i].x && corps[0].y == corps[i].y)
        {
            verf++;
        }
        if (i == langeur || verf != 0)
            break;
    }
    if (tete.x <= 10 || tete.x >= 70 || tete.y <= 10 || tete.y >= 30
        || verf != 0)
    {
        vie--;
        if (vie >= 0)
        {
            system("cls");
            mur();
            tete.x = 25;
            tete.y = 20;
            alongation = 0;
            tete.direction = RIGHT;
            Move();
        }
        else
        {
            system("cls");
            printf("game over\n");
            record();
            exit(0);
        }
    }
}
void apat()
{
    if (tete.x == apa.x && tete.y == apa.y)
    {
        langeur++;
        time_t a;
        a = time(0);
        srand(a);
        apa.x = rand() % 70;
        if (apa.x <= 10)
            apa.x += 11;
        apa.y = rand() % 30;
        if (apa.y <= 10)
            apa.y += 11;
    }
    else if (apa.x == 0)
    {
        apa.x = rand() % 70;
        if (apa.x <= 10)
            apa.x += 11;
        apa.y = rand() % 30;
        if (apa.y <= 10)
            apa.y += 11;
    }
}
void bas()
{
    int i;
    for (i = 0; i <= (tete.y - tour[alongation].y) && len < langeur; i++)
    {
        allerxy(tete.x, tete.y - i);
        {
            if (len == 0)
                printf("v");
            else
                printf("*");
        }
        corps[len].x = tete.x;
        corps[len].y = tete.y - i;
        len++;
    }
    tourner();
    if (!kbhit())
        tete.y++;
}
void gauche()
{
    int i;
    for (i = 0; i <= (tour[alongation].x - tete.x) && len < langeur; i++)
    {
        allerxy((tete.x + i), tete.y);
        {
            if (len == 0)
                printf("<");
            else
                printf("*");
        }
        corps[len].x = tete.x + i;
        corps[len].y = tete.y;
        len++;
    }
    tourner();
    if (!kbhit())
       tete.x--;

}
void droit()
{
    int i;
    for (i = 0; i <= (tete.x - tour[alongation].x) && len < langeur; i++)
    {
        corps[len].x = tete.x - i;
        corps[len].y = tete.y;
        allerxy(corps[len].x, corps[len].y);
        {
            if (len == 0)
                printf(">");
            else
                printf("*");
        }
 
        len++;
    }
    tourner();
    if (!kbhit())
        tete.x++;
void haut()
{
    int i;
    for (i = 0; i <= (tour[alongation].y - tete.y) && len < langeur; i++)
    {
        allerxy(tete.x, tete.y + i);
        {
            if (len == 0)
                printf("^");
            else
                printf("*");
        }
        corps[len].x = tete.x;
        corps[len].y = tete.y + i;
        len++;
    }
    tourner();
    if (!kbhit())
       tete.y--;

}
void tourner()
{
    int i, j, diff, x, y;
    for (i = alongation; len < langeur && i >= 0 ; i--)
    {
        if (tour[i].x == tour[i - 1].x)
        {
            diff = tour[i].y - tour[i - 1].y;
            if (diff < 0)
                for (j = 1; j <= (-diff); j++)
                {
                    corps[len].x = tour[i].x;
                    corps[len].y = tour[i].y + j;
                    allerxy(corps[len].x, corps[len].y);
                    printf("*");
                    len++;
                    if (len == langeur)
                        j=-diff+1;
                }
            else if (diff > 0)
                for (j = 1; j <= diff; j++)
                {
 
                    corps[len].x = tour[i].x;
                    corps[len].y = tour[i].y - j;
                    allerxy(corps[len].x, corps[len].y);
                    printf("*");
                    len++;
                    if (len == langeur)
                        j=diff+1;
                }
        }
        else if (tour[i].y == tour[i - 1].y)
        {
            diff = tour[i].x - tour[i - 1].x;
            if (diff < 0)
                for (j = 1; j <= (-diff) && len < langeur; j++)
                {
 
                    corps[len].x = tour[i].x + j;
                    corps[len].y = tour[i].y;
                    allerxy(corps[len].x, corps[len].y);
                    printf("*");
                    len++;
                    if (len == langeur)
                        j=-diff+1;
                }
            else if (diff > 0)
                for (j = 1; j <= diff && len < langeur; j++)
                {
 
                    corps[len].x = tour[i].x - j;
                    corps[len].y = tour[i].y;
                    allerxy(corps[len].x, corps[len].y);
                    printf("*");
                    len++;
                    if (len == langeur)
                        j=diff+1;
                }
       }
    }
    x = corps[langeur - 1].x;
    y = corps[langeur - 1].y;
    allerxy(x, y);
}
void mur()
{
    int i;
    allerxy(apa.x, apa.y);
    printf("*");
    for (i = 10; i < 71; i++)
    {
        allerxy(i, 10);
        printf("+");
        allerxy(i, 30);
        printf("+");
    }
    for (i = 10; i < 31; i++)
    {
        allerxy(10, i);
        printf("+");
        allerxy(70, i);
        printf("+");
    }
}
int Score()
{
    int score;
    allerxy(20, 8);
    score = langeur - 3

    printf("SCORE : %d", score);
    allerxy(50, 8);
    printf("Life : %d", vie);
    return score;
}
int scooore()
{
    int score = Score();
    system("cls");
    return score;
}
void record()
{
    char nj[20], nnj[20], rep, c;
    int i, j, px;
    FILE* info;
    info = fopen("record.txt", "a+");
    getch();
    system("cls");
    printf("Enter your name\n");
    scanf("%[^\n]",nj);
    for (j = 0;nj[j] != '\0'; j++)
    {
        nnj[0] = toupper(nj[0]);
        if (nj[j - 1] == ' ')
        {
            nnj[j] = toupper(nj[j]);
            nnj[j - 1] =nj[j - 1];
        }
        else
            nnj[j] =nj[j];
    }
    nnj[j] = '\0';
    fprintf(info, "nom joueur :%s\n", nnj);
    time_t mytime;
    mytime = time(NULL);
    fprintf(info, " Date:%s", ctime(&mytime));
    fprintf(info, "Score:%d\n", px = langeur - 5);
    for (i = 0; i <= 50; i++)
        fprintf(info, "%c", '_');
    fprintf(info, "\n");
    fclose(info);
    printf("voullez voir les autres record? 'oui'\n");
    rep = getch();
    system("cls");
    if (rep == "oui")
    {
        info = fopen("record.txt", "r");
        do
        {
            putchar(c = getc(info));
        } while (c != EOF);
    }
    fclose(info);
}
 
void main()
{
    char ns;
    afficher();
    system("cls");
    load();
    system("cls");
    langeur = 3;
    tete.x = 25;
    tete.y = 20;
    tete.direction = RIGHT;
    mur();
    apat();
    vie = 5;
    tour[0] = tete;
    Move();
}
Code:
{print: "hello nigger"}
 
you have to be high iq to code and a knowlege of math.
 
retardcels do not attempt to code, you will fail, learn cooking instead.
 
you have to be high iq to code and a knowlege of math.
Just out of interest which branches of mathematics must I master to code?

In my experience, addition and subtraction have been sufficient 95% of the time.

Look at the game code @Med Amine posted. It's full of +=, +, -, ++ operators.
 
Last edited:
retardcels do not attempt to code, you will fail, learn cooking instead.
you have no idea what cooking is you sandnigger. You are so ignorant that you can't even discern what cooking might really be
 
you have no idea what cooking is you sandnigger. You are so ignorant that you can't even discern what cooking might really be
Start a cooking course, teaching the basics and publish once a week. We will all benefit as food is very important.
 
Eagerly waiting
 
This is too difficult for below-average IQ incels like I (most of us are painfully average or, at worse, below-average).
 
Just out of interest which branches of mathematics must I master to code?

In my experience, addition and subtraction have been sufficient 95% of the time.

Look at the game code @Med Amine posted. It's full of +=, +, -, ++ operators.
All of it is useful. You don't have to master it, you just have to understand. Math is the language of pattern matching, and computers are all to do with patterns. If you want to do anything concering space, geometry and trionometry.
 
This is too difficult for below-average IQ incels like I (most of us are painfully average or, at worse, below-average).
learning to code is one thing and making something useful out it is another game. lowiqcels dont realise knowing one language is not enough.
 
lowiqcels dont realise knowing one language is not enough.
I do realize. I just don't have the required brainpower (and patience) to learn more languages other than plain and simple frameworks.
 
C++:
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <windows.h>
#include <conio.h>
#include <ctype.h>
#include <process.h>
#define UP 72
#define DOWN 80
#define LEFT 75
#define RIGHT 77
typedef struct coordonnes coordonnes;
struct coordonnes
{
    int direction;
    int x;
    int y;
};
coordonnes tete, tour[500], apa, corps[30];
int len;
char ns;
int vie;
void load();
int langeur;
int alongation;
void record();
void Move();
void apat();
int Score();
int scooore();
void afficher();
int speed;
void xy(int x, int y);
void allerxy(int x, int y);
void tourner();
void mur();
void bas();
void gauche();
void haut();
void droit();
void quiter();
void afficher()
{
    printf("instructions:\n");
    printf("\n-> Utilisez les fleches pour deplacer le serpent.\n\n-> Vous recevrez des aliments aux differentes coordonnees de l'ecran que vous devrez manger. Chaque fois que vous mangez un aliment la longueur du serpent sera augmentee d'un element.\n\n->Votre vie diminuera lorsque vous frapperez le mur ou le corps du serpent.\n\n-> Vous pouvez mettre le jeu en pause en son milieu en appuyant sur P. Pour continuer le jeu en pause appuyez à nouveau sur n'importe quelle autre nd\n\n-> Si vous voulez quitter appuyez sur esc\n");
    int r;
    printf("selectionner la difficulté et clicker deux foix sur entrer \n");
    printf("1.difficile \n 2.mediume\n 3.facile \n ");
    scanf("%d", &r);
    if (r == 1) {
        speed = 25;
    }
    else if (r == 2) {
        speed = 55;
    else {
        speed = 100;
    }
    if (getch() == 27)
        exit(0);
}
void Move()
Show quoted text
    ns = getch();
    if ((ns == LEFT && tete.direction != RIGHT && tete.direction !=LEFT) || (ns == UP && tete.direction != DOWN && tete.direction != UP)|| (ns == RIGHT && tete.direction != LEFT && tete.direction != RIGHT) || (ns == DOWN && tete.direction != UP && tete.direction != DOWN))
    {
        alongation++;
        tour[alongation] = tete;
        tete.direction = ns;
        if (ns == RIGHT)
            tete.x+;
        if (ns == UP
            tete.y--;
        if (ns == LEFT)
            tete.x--;
        if (ns == DOWN)
            tete.y++;
        Move();
    }
    else
    {
        printf("\a");
        Move();
    }}
void xy(int x, int y)
{
    COORD coord;
    coord.X = x;
    coord.Y = y;
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}
void allerxy(int x, int y)
{
    HANDLE a;
    COORD b;
    fflush(stdout);
    b.X = x;
    b.Y = y;
    a = GetStdHandle(STD_OUTPUT_HANDLE);
    SetConsoleCursorPosition(a, b);
}
void load()
{
    int row, col, i, j, q;
    xy(36, 14);
    printf("t'es pres?");
    xy(30, 15);
 
    for (i = 1; i <= 20; i++)
    {
        for (j = 0; j <= 10000000; j++)
            ;
        printf("%c", 177);
    }
    getch();
}
void quiter()
{
    int i, verf = 0;
    for (i = 4; i < langeur; i++)
    {
        if (corps[0].x == corps[i].x && corps[0].y == corps[i].y)
        {
            verf++;
        }
        if (i == langeur || verf != 0)
            break;
    }
    if (tete.x <= 10 || tete.x >= 70 || tete.y <= 10 || tete.y >= 30
        || verf != 0)
    {
        vie--;
        if (vie >= 0)
        {
            system("cls");
            mur();
            tete.x = 25;
            tete.y = 20;
            alongation = 0;
            tete.direction = RIGHT;
            Move();
        }
        else
        {
            system("cls");
            printf("game over\n");
            record();
            exit(0);
        }
    }
void apat()
{
    if (tete.x == apa.x && tete.y == apa.y)
    {
        langeur++;
        time_t a;
        a = time(0);
        srand(a);
        apa.x = rand() % 70;
        if (apa.x <= 10)
            apa.x += 11;
        apa.y = rand() % 30;
        if (apa.y <= 10)
            apa.y += 11;
    }
    else if (apa.x == 0)
    {
        apa.x = rand() % 70;
        if (apa.x <= 10)
            apa.x += 11;
        apa.y = rand() % 30;
        if (apa.y <= 10)
            apa.y += 11;
    }
}
 
void bas()
{
    int i;
    for (i = 0; i <= (tete.y - tour[alongation].y) && len < langeur; i++)
    {
        allerxy(tete.x, tete.y - i);
        {
            if (len == 0
                printf("v");
            else
                printf("*");
        }
        corps[len].x = tete.x;
        corps[len].y = tete.y - i;
        len++;
    }
    tourner();
    if (!kbhit())
        tete.y++;
}
 
void gauche()
{
    int i;
    for (i = 0; i <= (tour[alongation].x - tete.x) && len < langeur; i++)
    {
        allerxy((tete.x + i), tete.y);
        {
            if (len == 0)
                printf("<");
            else
                printf("*");
        }
        corps[len].x = tete.x + i;
        corps[len].y = tete.y;
        len++;
    }
    tourner();
    if (!kbhit())
        tete.x--;
}
void droit()
{
    int i;
    for (i = 0; i <= (tete.x - tour[alongation].x) && len < langeur; i++)
    {
        corps[len].x = tete.x - i;
        corps[len].y = tete.y;
        allerxy(corps[len].x, corps[len].y);
        {
            if (len == 0)
                printf(">");
            else
                printf("*");
        }
 
        len++;
    }
    tourner();
    if (!kbhit())
        tete.x++;
}
void haut()
{
    int i;
    for (i = 0; i <= (tour[alongation].y - tete.y) && len < langeur; i++)
    {
        allerxy(tete.x, tete.y + i);
        {
            if (len == 0)
                printf("^");
            else
                printf("*");
        }
        corps[len].x = tete.x;
        corps[len].y = tete.y + i;
        len++;
    }
    tourner();
    if (!kbhit()

        tete.y--;
}
void tourner()
{
    int i, j, diff, x, y;
    for (i = alongation; len < langeur && i >= 0 ; i--)
    {
        if (tour[i].x == tour[i - 1].x)
        {
            diff = tour[i].y - tour[i - 1].y;
            if (diff < 0)
                for (j = 1; j <= (-diff); j++)
                {
                    corps[len].x = tour[i].x;
                    corps[len].y = tour[i].y + j;
                    allerxy(corps[len].x, corps[len].y);
                    printf("*");
                    len++;
                    if (len == langeur)
                        j=-diff+1;
                }
            else if (diff > 0)
                for (j = 1; j <= diff; j++)
                {
 
                    corps[len].x = tour[i].x;
                    corps[len].y = tour[i].y - j;
                    allerxy(corps[len].x, corps[len].y);
                    printf("*");
                    len++;
                    if (len == langeur)
                        j=diff+1;
                }
        }
        else if (tour[i].y == tour[i - 1].y)
        {
            diff = tour[i].x - tour[i - 1].x;
            if (diff < 0)
                for (j = 1; j <= (-diff) && len < langeur; j++)
                {
 
                    corps[len].x = tour[i].x + j;
                    corps[len].y = tour[i].y;
                    allerxy(cors[len].x, corps[len].y);

                    printf("*");
                    len++;
                    if (len == langeur)
                        j=-diff+1;
                }
            else if (diff > 0)
                for (j = 1; j <= diff && len < langeur; j++)
                {
 
                    corps[len].x = tour[i].x - j;
                    corps[len].y = tour[i].y;
                    allerxy(corps[len].x, corps[len].y);
                    printf("*");
                    len++;
                    if (len == langeur)
                        j=diff+1;
                }
       }
    }
    x = corps[langeur - 1].x;
    y = corps[laneur - 1].y;
    allerxy(x, y);
}
void mur()
{
    int i;
    allerxy(apa.x, apa.y);
    printf("*");
    for (i = 10; i < 71; i++)
    {
        allerxy(i, 10);
        printf("+");
        allerxy(i, 30);
        printf("+");
    }
    for (i = 10; i < 31; i++)
    {
        allerxy(10, i);
        printf("+");
        allerxy(70, i);
        printf("+");
    }
}
int Score()
    int score;
    allerxy(20, 8);
    score = langeur - 3;
    printf("SCORE : %d", score);
    allerxy(50, 8);
    printf("Life : %d", vie);
    return score;
}
int scooore()
{
    int score = Score();
    system("cls");
    return score;
}
void record()
{
    char nj[20], nnj[20], rep, c;
    int i, j, px;
    FILE* info;
    info = fopen("record.txt", "a+");
    getch();
    system("cls");
    printf("Enter your name\n");
    scanf("%[^\n]",nj);
    for (j = 0;nj[j] != '\0'; j++)
    {
        nnj[0] = toupper(nj[0]);
        if (nj[j - 1] == ' ')
        {
            nnj[j] = toupper(nj[j]);
            nnj[j - 1] =nj[j - 1];
        }
        else
            nnj[j] =nj[j];
    }
    nnj[j] = '\0';
    fprintf(info, "nom joueur :%s\n", nnj);
    time_t mytime;
    mytime = time(NULL);
    fprintf(info, " Date:%s", ctime(&mytime));

    fprintf(info, "Score:%d\n", px = langeur - 5);
    for (i = 0; i <= 50; i++)
        fprintf(info, "%c", '_');
    fprintf(info, "\n");
    fclose(info);
    printf("voullez voir les autres record? 'oui'\n");
    rep = getch();
    system("cls");
    if (rep == "oui")
    {
        info = fopen("record.txt", "r");
        do
        {
            putchar(c = getc(info));
        } while (c != EOF);
   }
    fclose(info);
}
void main()
{
    char ns;
    afficher();
    system("cls");
    load();
    system("cls");
    langeur = 3;
    tete.x = 25;
    tete.y = 20;
    tete.direction = RIGHT;
    mur();
    apat();
    vie = 5;
    tour[0] = tete;
    Move();
Sent from Mail for Windows
Show quoted text
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <windows.h>
#include <conio.h>
#include <ctype.h>
#include <process.h>
#define UP 72
#define DOWN 80
#define LEFT 75
#define RIGHT 77
typedef struct coordonnes coordonnes;
truct coordonnes
{
    int direction;
    int x
    int y;
};
coordonnes tete, tour[500], apa, corps[30];
int len;
char ns;
int vie;
void load();
int langeur;
int alongation;
void record();
void Move();
void apat();
int Score();
int scooore();
void affiher();
int speed;
void xy(int x, int y);
void allerxy(int x, int y);
void tourner();
void mur();
void bas();
void gauche();
void haut();
void droit();
void quiter();
void afficher()
{
    printf("instructions:\n");
    printf("\n-> Utilisez les fleches pour deplacer le serpent.\n\n-> Vous recevrez des aliments aux differentes coordonnees de l'ecran que vous devrez manger. Chaque fois que vous mangez un aliment la longueur du serpent sera augmentee d'un element.\n\n->Votre vie diminuera lorsque vous frapperez le mur ou le corps du serpent.\n\n-> Vous pouvez mettre le jeu en pause en son milieu en appuyant sur P. Pour continuer le jeu en pause appuyez à nouveau sur n'importe quelle autre nd\n\n-> Si vous voulez quitter appuyez sur esc\n");
    int r;
    printf("selectionner la difficulté et clicker deux foix sur entrer \n");
    printf("1.difficile \n 2.mediume\n 3.facile \n ");
    scanf("%d", &r);
    if (r == 1) {
        speed = 25;
    }
    else if (r == ) {
        speed = 55;
    }
    else {
        speed = 100;
    }
    if (getch() == 27)
        exit(0);
void Move()
Show quoted tex
    ns = getch();
    if ((ns == LEFT && tete.direction != RIGHT && tete.direction !=LEFT) || (ns == UP && tete.direction != DOWN && tete.direction != UP)|| (ns == RIGHT && tete.direction != LEFT && tete.direction != RIGHT) || (ns == DOWN && tete.direction != UP && tete.direction != DOWN))
    {
        alongation++;
        tour[alongation] = tete;
        tete.direction = ns;
 
        if (ns == RIGHT)
            tete.x++;
        if (ns == UP)
            tete.y--;
        if (ns == LEFT)
            tete.x--;
        if (ns == DOWN)
            tete.y++;
        Move();
    }
    else
    {
        printf("\a");
        Move();
    }
}
void xy(int x, int y)
{
    COORD coord;
    coord.X = x;
    coord.Y = y;
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}
void allerxy(int x, int y)
{
    HANDLE a;
    COORD b
    fflush(tdout);
    b.X = x;
    b.Y = y;
    a = GetStdHandle(STD_OUTPUT_HANDLE);
    SetConsoleCursorPosition(a, b);
}
void load()
{
    int row, col, i, j, q;
    xy(36, 14);
    printf("t'es pres?");
    xy(30, 15);
 
    or (i = 1; i <= 20; i++)
    {
        for (j = 0; j <= 10000000; j++)
            ;
        printf("%c", 177);
    }
    getch();
}
void quiter()
{
    int i, verf = 0;
    for (i = 4; i < langeur; i++)
    {
        if (corps[0].x == corps[i].x && corps[0].y == corps[i].y)
        {
            verf++;
        }
        if (i == langeur || verf != 0)
            break;
    }
    if (tete.x <= 10 || tete.x >= 70 || tete.y <= 10 || tete.y >= 30
        || verf != 0)
    {
        vie--;
        if (vie >= 0)
        {
            system("cls");
            mur();
            tete.x = 25;
            tete.y = 20;
            alongation = 0;
            tete.direction = RIGHT;
            Move();
        }
        else
        {
            system("cls");
            printf("game over\n");
            record();
            exit(0);
        }
    }
}
void apat()
{
    if (tete.x == apa.x && tete.y == apa.y)
    {
        langeur++;
        time_t a;
        a = time(0);
        srand(a);
        apa.x = rand() % 70;
        if (apa.x <= 10)
            apa.x += 11;
        apa.y = rand() % 30;
        if (apa.y <= 10)
            apa.y += 11;
    }
    else if (apa.x == 0)
    {
        apa.x = rand() % 70;
        if (apa.x <= 10)
            apa.x += 11;
        apa.y = rand() % 30;
        if (apa.y <= 10)
            apa.y += 11;
    }
}
void bas()
{
    int i;
    for (i = 0; i <= (tete.y - tour[alongation].y) && len < langeur; i++)
    {
        allerxy(tete.x, tete.y - i);
        {
            if (len == 0)
                printf("v");
            else
                printf("*");
        }
        corps[len].x = tete.x;
        corps[len].y = tete.y - i;
        len++;
    }
    tourner();
    if (!kbhit())
        tete.y++;
}
void gauche()
{
    int i;
    for (i = 0; i <= (tour[alongation].x - tete.x) && len < langeur; i++)
    {
        allerxy((tete.x + i), tete.y);
        {
            if (len == 0)
                printf("<");
            else
                printf("*");
        }
        corps[len].x = tete.x + i;
        corps[len].y = tete.y;
        len++;
    }
    tourner();
    if (!kbhit())
       tete.x--;

}
void droit()
{
    int i;
    for (i = 0; i <= (tete.x - tour[alongation].x) && len < langeur; i++)
    {
        corps[len].x = tete.x - i;
        corps[len].y = tete.y;
        allerxy(corps[len].x, corps[len].y);
        {
            if (len == 0)
                printf(">");
            else
                printf("*");
        }
 
        len++;
    }
    tourner();
    if (!kbhit())
        tete.x++;
void haut()
{
    int i;
    for (i = 0; i <= (tour[alongation].y - tete.y) && len < langeur; i++)
    {
        allerxy(tete.x, tete.y + i);
        {
            if (len == 0)
                printf("^");
            else
                printf("*");
        }
        corps[len].x = tete.x;
        corps[len].y = tete.y + i;
        len++;
    }
    tourner();
    if (!kbhit())
       tete.y--;

}
void tourner()
{
    int i, j, diff, x, y;
    for (i = alongation; len < langeur && i >= 0 ; i--)
    {
        if (tour[i].x == tour[i - 1].x)
        {
            diff = tour[i].y - tour[i - 1].y;
            if (diff < 0)
                for (j = 1; j <= (-diff); j++)
                {
                    corps[len].x = tour[i].x;
                    corps[len].y = tour[i].y + j;
                    allerxy(corps[len].x, corps[len].y);
                    printf("*");
                    len++;
                    if (len == langeur)
                        j=-diff+1;
                }
            else if (diff > 0)
                for (j = 1; j <= diff; j++)
                {
 
                    corps[len].x = tour[i].x;
                    corps[len].y = tour[i].y - j;
                    allerxy(corps[len].x, corps[len].y);
                    printf("*");
                    len++;
                    if (len == langeur)
                        j=diff+1;
                }
        }
        else if (tour[i].y == tour[i - 1].y)
        {
            diff = tour[i].x - tour[i - 1].x;
            if (diff < 0)
                for (j = 1; j <= (-diff) && len < langeur; j++)
                {
 
                    corps[len].x = tour[i].x + j;
                    corps[len].y = tour[i].y;
                    allerxy(corps[len].x, corps[len].y);
                    printf("*");
                    len++;
                    if (len == langeur)
                        j=-diff+1;
                }
            else if (diff > 0)
                for (j = 1; j <= diff && len < langeur; j++)
                {
 
                    corps[len].x = tour[i].x - j;
                    corps[len].y = tour[i].y;
                    allerxy(corps[len].x, corps[len].y);
                    printf("*");
                    len++;
                    if (len == langeur)
                        j=diff+1;
                }
       }
    }
    x = corps[langeur - 1].x;
    y = corps[langeur - 1].y;
    allerxy(x, y);
}
void mur()
{
    int i;
    allerxy(apa.x, apa.y);
    printf("*");
    for (i = 10; i < 71; i++)
    {
        allerxy(i, 10);
        printf("+");
        allerxy(i, 30);
        printf("+");
    }
    for (i = 10; i < 31; i++)
    {
        allerxy(10, i);
        printf("+");
        allerxy(70, i);
        printf("+");
    }
}
int Score()
{
    int score;
    allerxy(20, 8);
    score = langeur - 3

    printf("SCORE : %d", score);
    allerxy(50, 8);
    printf("Life : %d", vie);
    return score;
}
int scooore()
{
    int score = Score();
    system("cls");
    return score;
}
void record()
{
    char nj[20], nnj[20], rep, c;
    int i, j, px;
    FILE* info;
    info = fopen("record.txt", "a+");
    getch();
    system("cls");
    printf("Enter your name\n");
    scanf("%[^\n]",nj);
    for (j = 0;nj[j] != '\0'; j++)
    {
        nnj[0] = toupper(nj[0]);
        if (nj[j - 1] == ' ')
        {
            nnj[j] = toupper(nj[j]);
            nnj[j - 1] =nj[j - 1];
        }
        else
            nnj[j] =nj[j];
    }
    nnj[j] = '\0';
    fprintf(info, "nom joueur :%s\n", nnj);
    time_t mytime;
    mytime = time(NULL);
    fprintf(info, " Date:%s", ctime(&mytime));
    fprintf(info, "Score:%d\n", px = langeur - 5);
    for (i = 0; i <= 50; i++)
        fprintf(info, "%c", '_');
    fprintf(info, "\n");
    fclose(info);
    printf("voullez voir les autres record? 'oui'\n");
    rep = getch();
    system("cls");
    if (rep == "oui")
    {
        info = fopen("record.txt", "r");
        do
        {
            putchar(c = getc(info));
        } while (c != EOF);
    }
    fclose(info);
}
 
void main()
{
    char ns;
    afficher();
    system("cls");
    load();
    system("cls");
    langeur = 3;
    tete.x = 25;
    tete.y = 20;
    tete.direction = RIGHT;
    mur();
    apat();
    vie = 5;
    tour[0] = tete;
    Move();
}
wow look at those hot lines of codes, said no one ever.
 
All of it is useful. You don't have to master it, you just have to understand. Math is the language of pattern matching, and computers are all to do with patterns. If you want to do anything concering space, geometry and trionometry.
Pattern matching using regular expressions are not difficult and involve no math. Standard libraries support string manipulation, comparison, split, match, substitute and others requiring very simple arithmetic.

It's been my experience most programming work does not use geometry or trigonometry. Like I said, simple arithmetic operators are the most common and most people can add and subtract.

And anyway you don't program, say, statistic functions from scratch. Use a library.

Most commercial programming uses simple arithmetic.
 
Last edited:
Will this help me get tight virgin pussy?
 
wow look at those hot lines of codes, said no one ever.
If you write a program the creative joy is involved. It's a good cope better than following the news, watching shows and films and all the rest we are brainwashed with.

Look at the sources for, say, GNU coreutils. One of the tricks is to study good code and aim for elegance. Don't tell me that code is badly written. I look at it and try to emulate it.
 
Will this help me get tight virgin pussy?
I'm BlackPilled and have given up all hope of finding a female.

I focus on survival and programming makes money which I use for shelter, food, clothing, run a 20 year car, buy books, pay for utilities.

Programming can be a good cope too, the creative joy.
 
Pattern matching using regular expressions are not difficult and involve no math. Standard libraries support string manipulation, comparison, split, match, substitute and others requiring very simple arithmetic.

It's been my experience most programming work does not use geometry or trigonometry. Like I said, simple arithmetic operators are the most common and most people can add and subtract.

You don't program, say, statistic functions from scratch. Use a library.

Most commercial programming uses simple arithmetic.
I meant that in the most general sense. "difficult" here implies that you like bragging about doing hard work with numbers for some reason. anybody with an intrest can excel in math not that it's even an achievement. And achievement is having a good face and the social life it fruits.
I don't work as a programmer. I thought you meant like as recreational incel hobby. Commercial programming seems to be about how well you can use frameworks and smash together. Good job IMO. If I went to college I would be slaving like that.
 
How to use software to defeat normies?
 
I do realize. I just don't have the required brainpower (and patience) to learn more languages other than plain and simple frameworks.
You're AVI says statistics. Here is code in R to calculate a standard deviation:

sd(x)

where x is list of numbers.

This is simple. Other languages make it simple too. I've seen economic graduates, spend all their time working maybe 100 lines of R and that's all they do all day. Play with a bit of code and get paid more than me.

They don't even know how pretty print it. It's just a block of code they can barely read themselves.
 
I meant that in the most general sense. "difficult" here implies that you like bragging about doing hard work with numbers for some reason. anybody with an intrest can excel in math not that it's even an achievement. And achievement is having a good face and the social life it fruits.
I don't work as a programmer. I thought you meant like as recreational incel hobby. Commercial programming seems to be about how well you can use frameworks and smash together. Good job IMO. If I went to college I would be slaving like that.
I'm not bragging about advanced mathematics. I'm saying simple arithmetic operators are more than adequate in commercial programming and if, rarely, advanced math is required they are plenty of quality libraries available.

Some members don't know anything about how a computer works or how to program so I thought to explain the core essentials. Others might like to program and understanding essentials will help them.
 
Why couldn’t you have done this when I was failing my hs coding class
 
You're AVI says statistics. Here is code in R to calculate a standard deviation:

sd(x)

where x is list of numbers.

This is simple. Other languages make it simple too. I've seen economic graduates, spend all their time working maybe 100 lines of R and that's all they do all day. Play with a bit of code and get paid more than me.

They don't even know how pretty print it. It's just a block of code they can barely read themselves.
Programming requieres enough patience to handle multiple languages throughout your career (hobbyism is totally another matter). That's called above-average intelligence above the mean. I'm not made for anything. I'll try going to Ukraine instead.
 
I'm not bragging about advanced mathematics. I'm saying simple arithmetic operators are more than adequate in commercial programming and if, rarely, advanced math is required they are plenty of quality libraries available.

Some members don't know anything about how a computer works or how to program so I thought to explain the core essentials. Others might like to program and understanding essentials will help them.
While the gesture is nice, there is free and quality education everywhere on the internet. You could learn to do anything if you wanted to. The reason then that it's not done is a lack of intrest. Normies advance social lifes rather than their knowledge on a subject, especially in early life.
Motivation, ambition and creativity are everything to producing anything that'll be enjoyed. Having all of those when you are a low value dirt stain specter in society is rare. You gotta be fucked in the head to be able to function well without a social life.
 
Programming requieres enough patience to handle multiple languages throughout your career (hobbyism is totally another matter). That's called above-average intelligence above the mean.
If someone learnt Python inside out I'm sure they will be in work for 10 years at least. They might have to learn a few libraries but so what. That's part of the job.

I learnt C and used it for 3 years. Bash was easy to pick up. I had to use gdb but that's not hard, it's simple.

I could be using C for the rest of my life but wanted a break from bug fixing and I'm doing a Linux Engineer job now which is so so easy because I know how to program.
 
Last edited:
You gotta be fucked in the head to be able to function well without a social life.
Or desperate. Like living in temporary accommodation and having no money in the pocket and always hungry.

Point me to a quality training course ,on the Internet, on C programming. A course that is better than The C Programming Language book.

I thought to impart basic core ideas that I've noticed many programmers don't have and keeping them to mind makes learning easier. Also, members who find programming a mystery would benefit.

Although now I'm thinking why should I even bother. Too much negativity.
 
Or desperate. Like living in temporary accommodation and having no money in the pocket and always hungry.
Touche.
You shouldn't bother mate. The will is not there for the overwhelming majority of users. Just go make something you enjoy. Do you use Emacs?
If you did want to make a course, leave incel spaces and target normies. I still think it's meh, because I know you aren't old enough to be a professer and I would rather listen to a professor profess about what he knows so well (yes he, JFL@U listening to female professors)
 
Touche.
You shouldn't bother mate. The will is not there for the overwhelming majority of users. Just go make something you enjoy. Do you use Emacs?
If you did want to make a course, leave incel spaces and target normies. I still think it's meh, because I know you aren't old enough to be a professer and I would rather listen to a professor profess about what he knows so well (yes he, JFL@U listening to female professors)
Not Emacs, vim and ctags.
 
how to weaponize this software skill against normies?
They've already turned it against themselves.

Facebook and the other social media apps are a time waster and effect mental health. Gaming, gambling, porn, and streaming sites are also harmful.
 
I am interested. I never got around to learn coding. I did limited coding in uni with Visual Basic but that seemed too autistic to pursue it further
 
They've already turned it against themselves.

Facebook and the other social media apps are a time waster and effect mental health. Gaming, gambling, porn, and streaming sites are also harmful.
I like that perspective, use the normies weakness against themselves
 
Course 0: UNWELCOMED (for below-average IQ inkwells).
 

Similar threads

Shaktiman
Replies
19
Views
1K
GaelicTruecel
G
J
Replies
25
Views
1K
failednormie_
failednormie_
lonelysince2006
Replies
39
Views
2K
Julaybib
Julaybib
Zhou Chang-Xing
Replies
15
Views
1K
GhostRick02
GhostRick02

Users who are viewing this thread

shape1
shape2
shape3
shape4
shape5
shape6
Back
Top