Changed type of C from int to char; also used cin.getline(input, number), cin.clear(), cin.sync() in main()