#include <iostream>
#include <string>
using namespace std;
int main() {
string str;
int length = 0;
cout << "Enter a string: " << endl;
getline(cin, str);
// this will take only one word cin>>str;
for (int i = 0; str[i] != '\0'; i++) {
length++;
}
// or we can write length = str.length();
cout << "Length of string: " << length << endl;
return 0;
}
Flow Charts Flow charts are a useful tool in many situations, as we make a process easy to understand at a glance. Using just a few words and some simple symbols, they show clearly what happens at each stage and how this affects other decisions and actions. What Is a Flow Chart? In 1921, the Frank and Lillian presented what was only a "graphic-based method" in a presentation titled: “ Process Charts: First Steps in Finding the One Best Way to do Work ”, to members of the American Society of Mechanical Engineers (ASME). When to Use a Flowchart? Flowchart is a very simple yet powerful tool to improve productivity in both our personal and work life. Here are some ways flowchart can be helpful: · Document a process · Present solution to a problem · Brainstorm ideas in a meeting · Design an operation system · ...

Comments
Post a Comment