79089750

Date: 2024-10-15 11:45:32
Score: 1
Natty:
Report link

The problem is that cin only reads until it reaches a space or end of line. To get input strings that contain spaces you will need to use the getline function instead.

replace cin >> input; with getline(cin, input);

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: cbspace