Charly692 / My_project

lil project from floor to the star <3
0 stars 0 forks source link

printf_s securities fail #1

Open Miracjuiceee opened 6 months ago

Miracjuiceee commented 6 months ago

Printf can be repleaced by scanf_s due of the new securities uprgrade concerning c methods.

Miracjuiceee commented 6 months ago
    scanf_s("%d", &Language);
    if (Language == 1) {
        printf("Bonjour, je suis calculana aucun chiffre ni Nombre ne peut me resister, essayer pour voir :\n ");
    }
    if (Language == 2) {
        printf("Hello, I'm calculana, no number or number can resist me, try to see :\n ");
    }
    scanf_s("%d", &nombre1);
    if (Language == 1) {
        printf("Donne moi un deuxieme nombre :\n ");
    }
    if (Language == 2) {
        printf("Give me second Number :\n ");
    }
    scanf_s("%d", &nombre2);
    if (Language == 1) {
        printf("Donner moi maintenant le symbole de calcule sachant que :\n 1 = addition, 2 = soustraction, 3 = division, 4 = multiplication :\n ");
    }
    if (Language == 2) {
        printf("Now give me the calculation symbol knowing that 1 = addition, 2 = subtraction, 3 = division, 4 = multiplication :\n ");
    }
    scanf_s("%d", &Symboledecalcule);