Will not let me return true or false

2

I have to return true or false , but I get an error when I create the variable bool.

How could I do?

#include<stdio.h>

main(){
    int z[50], n, i, suma=0;
    bool verd = true;
    bool fals = false;

    printf("Ingresar cantidad de digitos que desea sumar: ");
    scanf("%d", &n);

    for(i=0;i<n; i++){
        scanf("%d", &z[i]);
        suma+=z[i];
    }
    if(suma % 11 == 0){
        printf("Es multiplo de 11.");
        return verd;
    }
    else{
        printf("No es multiplo de 11.");
        return fals;
    }

    printf("Total: %d", suma);

    return 0;
}
    
asked by P. Matias 21.10.2016 в 23:46
source

1 answer

3

Add stdbool.h library

#include <stdbool.h>
    
answered by 22.10.2016 / 00:03
source