C++primer plus第六版课后编程题答案17.1

来源:互联网 发布:sql anywhere 12 下载 编辑:程序博客网 时间:2024/06/05 10:53
#include <iostream>using namespace std;int main(){    cout<<"Enter the str:";    int count=0;    char ch;    while(cin.peek()!='$')    {         cin>>ch;         count++;             }    cout<<"\nIt has "<<count<<"  char "<<endl;    cin.get();    cin.get();    system("pause");               } 

0 0
原创粉丝点击