問題にぶつかって、解く.1行の文字を入力し、大文字、小文字、スペース、数字、その他の文字がどれだけあるかを見つけます.(ポインタ)
770 ワード
/*
* Copyright (c) 2012,
* All rights reserved.
* :
* :2012 12 06
* :v1.0
*
* :
* : , , , , , 。( )
*
* :
* :
* :
*/
#include
using namespace std;
int main()
{
int upper=0,lower=0,digit=0,space=0,other=0,i=0;
int *p,a[20];
cout<='A')&&(*p<='Z'))
{
++upper;
}
else if((*p>='a')&&(*p<='z'))
{
++lower;
}
else if((*p>='0')&&(*p<='9'))
{
++digit;
}
else if((*p==' '))
{
++space;
}
else
{
++other;
}
}
cout<