I must write a program that will retrieve from the user the string consisting only letters "A" and "B". That string length is 10 characters (each character must be read separately). The program should detect and signal when it finds the sequence "ABBA" is in that string.
How to do it without arrays? I think the only way to do it, is make 10 scanf, and many of IF statements.
Aucun commentaire:
Enregistrer un commentaire