Back
Cap_Phat_Dong_Them.cpp
Save
// Cap_Phat_Dong_Them.cpp #include
#include
#include
using namespace std; void thayThe(char* str) { for (int i = 0; i < strlen(str); i++) { if (isupper(*(str+i))) { *(str+i) = tolower(*(str+i)); } else if (islower(*(str+i))) { *(str+i) = toupper(*(str+i)); } } } void demSoNguyen(char* str) { int so = 0; bool bat_dau = true; for (int i = 0; i < strlen(str); i++) { if (isdigit(str[i])) { if (bat_dau) { so++; bat_dau = false; } } else { bat_dau = true; } } cout<<"So so nguyen: "<