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
#include <iostream>
#include <cstring>
using namespace std;
int main()
{
char s[101], *p, word[101];
int x = 0;
cin.getline (s,101);
p = strtok(s," ");
while(p!=NULL)
{
strcpy(word,p);
if(strlen(word)%2==0)
{cout<<"#";
x = 1; }
else
cout<<word;
p = strtok(NULL," ");
}
if(x==0)
cout<<"No words";
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run