Lesson 3 of 24
cin మరియు getline తో Input
8 min 20 XP
cin >> x ఒక value ను space లేదా కొత్త లైన్ వరకు చదువుతుంది. Spaces ఉన్న మొత్తం లైన్కు getline(cin, s) వాడండి. cin >> తర్వాత, getline ముందు మిగిలిన newline ను దాటవేయడానికి cin.ignore() call చేయండి.
Example: edit me and press Run
Output Loading C++ (first time takes a few seconds)
Press Run to see the result here.