Basically what I want to do. It is to receive a String on the command line. Only with the String entered, they have to be in the binary base, so I do an if to check if it is binary or not. My problem is in the if, because regardless of the value you enter. Always enters the if. - Thank you for your help!
int main(){
char binario [50][100]={"0000","0001","0010","0011","0100","0101","0110","0111","1000","1001","1010","1011","1100","1101","1110","1111"};
char nome [50][100];
int contador=0;
printf("Insira um valor");
scanf("%s",nome[0]);
while(nome[contador]!='int main(){
char binario [50][100]={"0000","0001","0010","0011","0100","0101","0110","0111","1000","1001","1010","1011","1100","1101","1110","1111"};
char nome [50][100];
int contador=0;
printf("Insira um valor");
scanf("%s",nome[0]);
while(nome[contador]!='%pre%'){
if (nome[0] != binario[contador])
{
printf("Base inicial invalida");
break;
}
contador++;
}
return 0;
}
'){
if (nome[0] != binario[contador])
{
printf("Base inicial invalida");
break;
}
contador++;
}
return 0;
}