问题描述 关于输入年月日判断几天的C++代码 #include using namespace std; int main() { int year,month,day,sum,daojishi,p; bool leap; cout<<"请输入年月日 "; cin>>year>>month>>day; switch(month) { case 1:sum=0;break; case 2:sum=31;break; case 3:sum=5
问题描述 C++输入句子判断字母数量 #include using namespace std; int main() { cout<<""Please enter a sentence in English.""< char sentence[500]; cin.getline (sentence500); int count = 0; int i; for(char *str = sentence ; str[i] ; str++) { if(