#include <iostream>
using namespace std;

int main()
{
char ourStr[128] = ""; // для сохранения строки
cout << "Vvedite tekst latinicey (ne bolshe 128 simvolov):\n";
cin.getline(ourStr, 128);

int amountOfSymbol = 0; // счетчик символов
while (ourStr[amountOfSymbol] != '\0')
{
amountOfSymbol++;
}

cout << "Stroka \"" << ourStr << "\" sostoit iz "
<< amountOfSymbol << " simvolov!\n\n";

return 0;
}

Оценка - 1.0 (8)

2015-11-08 • Просмотров [ 1226 ]