Answer the question
In order to leave comments, you need to log in
How to derive a patronymic from a row that consists of a surname, name and patronymic?
Unable to withdraw. Outputs something's name (
#include <iostream>
#include <string.h>
using namespace std;
int main(int argc, char** argv)
{
char name[50];
char *p, *r, *y, *h;
cout << "Enter name" << endl;
cin.getline(name, 50);
int x, g;
x = strlen(name);
cout << x << endl;
int a = 0;
for (int i=0; i<50; i++)
{
if(name[i] =='a')
a++;
}
cout << "Kilkist \"a\" = " << a << endl;
p = strchr(name, ' ');
strtok(p, " ");
cout << " Name " << p << endl;
h = strchr (p, ' ');
strtok(h, " ");
cout << "3 word " << h << endl;
g = strlen(h);
cout << "Size word " << g << endl;
return 0;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question