//OrinTill Qimid CS1A Chapter 4, P. 294, 10
//
/**************************************************************
 * String length
 * 
 * ____________________________________________________________
 *This program will count the length of the entered string.
 * ____________________________________________________________
 * INPUT
 * Entered string.
 * OUTPUT
 * Length of the string.
 **************************************************************/
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
 int stringLength(const char *str) 
{
    int length = 0;
    while (*str != '\0') {
        length++;
        str++;
    }
    return length;
}

int main() 
{
    char inputString[100];

    cout << "Enter a string: ";
    cin.getline(inputString, 100);

    int length = stringLength(inputString);

    cout << "The length of the string is: " << length << endl;

    return 0;
}