![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 06.10.2019 06:30 shanicar33500
Prompt the user to enter a string of their choosing. output the string. (1 pt) ex: enter a sentence or phrase: the only thing we have to fear is fear itself. you entered: the only thing we have to fear is fear itself.(2) complete the getnumofcharacters() function, which returns the number of characters in the user's string. we encourage you to use a for loop in this function. (2 pts)(3) in call the getnumofcharacters() function and then output the returned result. (1 pt)(4) implement the outputwithoutwhitespace() function. outputwithoutwhitespace() outputs the string's characters except for whitespace (spaces, tabs). note: a tab is '\t'. call the outputwithoutwhitespace() function in (2 pts) ex: enter a sentence or phrase: the only thing we have to fear is fear itself. you entered: the only thing we have to fear is fear itself. number of characters: 46 string with no whitespace: .' c++ c++ c++ is what i have so far: #include #include using namespace std; //returns the number of characters in usrstrint getnumofcharacters(int usrstr) {usercount = usrstr. length(); return usercount; }const outputwithoutwhitespaces(string& ; usrstr) {string text; text = text. replace(" ",""); return text; }int main() {string usrstr; cout < < "enter a sentence or phrase: "; getline(cin, usrstr); cout < < "you entered: " < < usrstr < < endl; int count = getnumofcharacters(); cout < < "number of characters: " < < count < < endl; cout < < "string with no whitespace: " < < outputwithoutwhitespace() < < endl; return 0; }
![ansver](/tpl/images/cats/User.png)
Answers: 2
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Other questions on the subject: Computers and Technology
![image](/tpl/images/cats/informatica.png)
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 20:30, batmandillon21
1. for which of the following are you not required to signal beforehand? a. changing lanes b. speeding up c. stopping
Answers: 2
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 07:20, djs1002
Ingrid started speaking about her slide presentation. when she clicked to th"third slide, which had just a picture of an elephant, she forgot what she wassupposed to talk about. what could ingrid do to avoid this situation in thefuture? oa. print handouts for her audience. ob. add presenter's notes to each slide. oc. add a video to each slide. od. save her slide presentation to a flash drive
Answers: 2
You know the right answer?
Prompt the user to enter a string of their choosing. output the string. (1 pt) ex: enter a sentence...
Questions in other subjects:
![Konu](/tpl/images/cats/ekonomika.png)
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/himiya.png)
![Konu](/tpl/images/cats/geografiya.png)
![Konu](/tpl/images/cats/geografiya.png)
![Konu](/tpl/images/cats/en.png)
![Konu](/tpl/images/cats/mat.png)
Mathematics, 28.11.2020 03:50
![Konu](/tpl/images/cats/mat.png)
Mathematics, 28.11.2020 03:50
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 28.11.2020 03:50