5. My Sincere Apologies (C PROGRAMMING ONLY) by CodeChum Admin Okay, I don't know what got into me but that was childish! Spamming someone is immature and does not show good ethics. Never do it unless it's an emergency. I should apologize to my friend, Lionel huhu! Would you help me? I already know how to structure the flow of my message, just please help me define it properly. Instructions: In the code editor, you are provided with a main() code with multiple calls to a function which is already declared but not yet defined called, sendApology(). Your task is to define the sendApology() function with the following details: Return type - void Function name - sendApology Parameters - a character and an integer. The sendApology() function will first check if the character passed is either 's', 'o', 'r', or 'y'. If it is, print it based on the passed integer number of times. For example, if the passed integer is 5, then you need to print the character 5 times. Otherwise, just ignore it (i.e. don't do anything). Do not edit the main() code. Output sooorrrrrrrrryyyyy
5. My Sincere Apologies (C PROGRAMMING ONLY)
by CodeChum Admin
Okay, I don't know what got into me but that was childish! Spamming someone is immature and does not show good ethics. Never do it unless it's an emergency.
I should apologize to my friend, Lionel huhu! Would you help me? I already know how to structure the flow of my message, just please help me define it properly.
Instructions:
In the code editor, you are provided with a main() code with multiple calls to a function which is already declared but not yet defined called, sendApology().
Your task is to define the sendApology() function with the following details:
Return type - void
Function name - sendApology
Parameters - a character and an integer.
The sendApology() function will first check if the character passed is either 's', 'o', 'r', or 'y'. If it is, print it based on the passed integer number of times. For example, if the passed integer is 5, then you need to print the character 5 times. Otherwise, just ignore it (i.e. don't do anything).
Do not edit the main() code.
Output
sooorrrrrrrrryyyyy
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images