program sederhana mengubah huruf ke biner C++

#include<stdio.h>

int main()
{
int a, b;
printf(“jumalah karakter nama anda : “);
scanf(“%d”, &a);

char tulisan[a];

printf(“Masukkan %d karakter huruf : “, a);
//scanf(“%d”, &a);

for(b = 0; b < a + 1; b++)
{
scanf(“%c”, &tulisan[b]);
}

for(b = 0; b < a + 1; b++)
{
if(tulisan[b] == ‘a’){printf(“01100001 “);}
else if(tulisan[b] == ‘b’){printf(“01100010 “);}
else if(tulisan[b] == ‘c’){printf(“01100011 “);}
else if(tulisan[b] == ‘d’){printf(“01100100 “);}
else if(tulisan[b] == ‘e’){printf(“01100101 “);}
else if(tulisan[b] == ‘f’){printf(“01100110 “);}
else if(tulisan[b] == ‘g’){printf(“01100111 “);}
else if(tulisan[b] == ‘h’){printf(“01101000 “);}
else if(tulisan[b] == ‘i’){printf(“01101001 “);}
else if(tulisan[b] == ‘j’){printf(“01101010 “);}
else if(tulisan[b] == ‘k’){printf(“01101011 “);}
else if(tulisan[b] == ‘l’){printf(“01101100 “);}
else if(tulisan[b] == ‘m’){printf(“01101101 “);}
else if(tulisan[b] == ‘n’){printf(“01101110 “);}
else if(tulisan[b] == ‘o’){printf(“01101111 “);}
else if(tulisan[b] == ‘p’){printf(“01110000 “);}
else if(tulisan[b] == ‘q’){printf(“01110001 “);}
else if(tulisan[b] == ‘r’){printf(“01110010 “);}
else if(tulisan[b] == ‘s’){printf(“01110011 “);}
else if(tulisan[b] == ‘t’){printf(“01110100 “);}
else if(tulisan[b] == ‘u’){printf(“01110101 “);}
else if(tulisan[b] == ‘v’){printf(“01110110 “);}
else if(tulisan[b] == ‘w’){printf(“01110111 “);}
else if(tulisan[b] == ‘x’){printf(“01111000 “);}
else if(tulisan[b] == ‘y’){printf(“01111001 “);}
else if(tulisan[b] == ‘z’){printf(“01111010 “);}
else if(tulisan[b] == ‘ ‘){printf(“11111111 “);}
}

}