bai4

#include<iostream>
#include<stdlib.h>
#include<string.h>
#define dau "., :;{}[]?!}"
using namespace std;
int main(){
int dem=0;
char s[1000];
char *p;
cout << "nhap doan van ban:\n";
cin.getline(s,999);
p = strtok(s,dau);
while(p!=NULL){
dem++;
p= strtok(NULL,dau);
}
cout << " so tu la: " << dem;
system ("pause");
return 0;
}