#include<iostream>
#include<string>
using namespace std;
int character (values v)
{
int charnum=v.size();
for(char i=0; i<v.size(); i++)
{
if(v.Location(i)== ' ')
{
charnum--;
}
if(v.Location(i)== '.')
{
charnum--;
}
}
cout<<"Enter values has "<<charnum <<" Characters:"<<end;
}
int main()
{
values v;
char i;
cout<<"the type of a values: " ;
cin >> v
getline(v);
character(v);
return 0;
}
#include<string>
using namespace std;
int character (values v)
{
int charnum=v.size();
for(char i=0; i<v.size(); i++)
{
if(v.Location(i)== ' ')
{
charnum--;
}
if(v.Location(i)== '.')
{
charnum--;
}
}
cout<<"Enter values has "<<charnum <<" Characters:"<<end;
}
int main()
{
values v;
char i;
cout<<"the type of a values: " ;
cin >> v
getline(v);
character(v);
return 0;
}
No comments:
Post a Comment