結果 : string function program to determine output