CPP
cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
CHALLENGE: Counting And Display Strings
Write a program that captures a string that can contain spaces and displays each word in the string, the separator being the space.
Example, for the input: "I think so I am"
The program displays:
word 1: I
word 2: think
word 3: so
word 4: I
word 5: am
And finally it shows how many words the sentence has.
Good luck.
*/
#include <iostream>
#include <string>
using namespace std;
class Splitted
{
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run