Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, just a quick question on how I solve this. I am having troubles with functions :( WeeklyTask3 This task will have you write a

Hello, just a quick question on how I solve this. I am having troubles with functions :(

image text in transcribed

WeeklyTask3 This task will have you write a number of functions. The following functions can be present in your program code in any order, but the last line of your program must be mainO so that you are calling your main program to cause it to execute. main() This function prompts the user for three items Enter three sentences, one after the other . a string of potential start characters . a string of potential end characters Then call each of the following functions (in the order given), separately for each of the three sentences entered from the keyboard. printlfNumeric(line) This function will print the entire line if the first character on the line is a digit. See the sample run below for output details printlfComment(line) This function will print the entire line if the first character on the line is #. See the sample run below for output details printlfStarts (line, chars) This function will print the entire line if the first character on the line is any of the characters in the starts string. See the sample run below for output details printlfEnds(line, chars) This function will print the entire line if the last character on the line is any of the characters in the ends string. See the sample run below for output details printOdds(line) This function will print the characters in the odd index locations within the string (1,3,5,etc.). See the sample run below for output details The best way to approach a program like this is to write just one of the last five functions and the part of main up to where that function is called. Get that much of your program debugged and then proceed to add another function and the call to t in main. Continue until all functions are written and debugged. Here is a sample run. ttle Ta Enter Enter second Tine of sentence: 4, 5, 6, Pick up sticks Enter third line of sentence : #The mad hatter was here Enter the "starts string": aA Enter the "ends string"? .! rst e of sentence: Mary had a ary had a little 1amb, Ends with any of: Mary had a little lamb, s: ayhdaltl ab 5, 6, Pick up sticks ric: 4, 5, 6, Pick up sticks s: ,5 ,Pc psik #The mad hatter was here Comment: #The mad hatter was here dds: Temdhte a ee

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Next Generation Databases NoSQLand Big Data

Authors: Guy Harrison

1st Edition

1484213300, 978-1484213308

More Books

Students also viewed these Databases questions

Question

Ability to work comfortably in a team environment

Answered: 1 week ago