Home > database >  Decide whether a character in a string of number, if you don't appear it returns 0. What is goi
Decide whether a character in a string of number, if you don't appear it returns 0. What is goi

Time:12-21

#include
using namespace std;
Int main ()
{char a, [10].
Char * p;
char c;
Int sum=0;
cout<" Please input a string: ";
for(int i=0; i<=9; I++)
Cin> A, [I].
cout<" Please enter the characters you want to find: ";
Cin> C;
For (p=a; * p!='\ 0'; P++)
{if (* p=='c')
Sum++;
The else sum;
}
Cout & lt; return 0;
}


  • Related