C ++ program to check if a string either starts or ends with 01
#include <bits/stdc++.h> NEW_LINE using namespace std ; void stateA ( string ) ; void stateB ( string ) ; void stateC ( string ) ; void stateD ( string ) ; void stateE ( string ) ; void stateF ( string ) ;