C++ · ОСНОВЫ · LESSON 13
The word and its length
string.size() · about 12 minutes
Learning with progressRead the summary for free. To save the work, log in to the account.
Type the code yourself
Manually type the program from the sample. So you'll remember commands and brackets.
#include <iostream>
#include <string>
using namespace std;
int main() {
string word = "cat";
cout << word.size() << endl;
return 0;
}Open the editor for class workSolve it yourself
Create string word = «dog» in Latin letters and output the length through size().
The answer is hidden. Use similar examples from the lesson notes.
Opening up your homework