C++ 6.42 LAB: Warm up: Text analyzer & modifier

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

C++ 6.42 LAB: Warm up: Text analyzer & modifier

Post by answerhappygod »

C++ 6.42 LAB: Warm up: Text analyzer & modifier
C 6 42 Lab Warm Up Text Analyzer Modifier 1
C 6 42 Lab Warm Up Text Analyzer Modifier 1 (68.62 KiB) Viewed 43 times
6.42 LAB: Warm up: Text analyzer & modifier (1) 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 main(), call the GetNumOfCharacters() function and then output the returned result. (1 pt) (4) Implement the Output WithoutWhitespace() function. OutputWithoutWhitespace() outputs the string's characters except for whitespace (spaces, tabs). Note: A tab is '\t'. Call the Output Without Whitespace() function in main(). (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: The onlythingwehavetofearisfearitself.
LAB ACTIVITY 6.42.1: LAB: Warm up: Text analyzer & modifier 1 #include 2 #include 3 using namespace std; 4 5 //Returns the number of characters in usrStr 6 int GetNumOfCharacters (const string usrStr) { 7 8 /* Type your code here. */ 9 10 } 11 12 int main() { 13 14 /* Type your code here. */ 15 16 return 0; 17 } main.cpp 0/6 Load default template...
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply