+ 2
Can anyone help me with this program, please?
I want to write a C++ program that computes the length of a character array that will be a string, also I want the array to be entered by the user. (using for loop or while) * I'm just a student of computer engineernig in the first grade, so I haven't learnt all of the methods and libraries. Because of that, I'm not allowed to use them with the homeworks.
3 Réponses
+ 2
#include <iostream>
#include<string>
using namespace std;
int main() {
string word;
cin>>word;
cout<<"Your word length is::"<<word.length();
return 0;
}
+ 2
Thank you, Bright Humble .
+ 1
U wlcm Elysium