+ 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.

2nd Mar 2019, 5:03 PM
Janna Al-Ward
Janna Al-Ward - avatar
3 Respuestas
+ 2
#include <iostream> #include<string> using namespace std; int main() { string word; cin>>word; cout<<"Your word length is::"<<word.length(); return 0; }
3rd Mar 2019, 12:03 AM
Bright Obeng
Bright Obeng - avatar
+ 2
Thank you, Bright Humble .
8th Mar 2019, 2:00 PM
Janna Al-Ward
Janna Al-Ward - avatar
+ 1
U wlcm Elysium
8th Mar 2019, 2:19 PM
Bright Obeng
Bright Obeng - avatar