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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
main.c
< > + C
5. My Sincere Apologies
1
#include<stdio.h>
by CodeChum Admin
2
3 void sendApology(char, int);
Okay, I don't know what got into me but that
4
was childish! Spamming someone is
5. int main(void) {
sendApology('s', 2);
sendApology('f', 10);
sendApology('b', 3);
sendApology('o', 5);
sendApology('r', 12);
sendApology('m', 5);
sendApology('v', 2);
sendApology('y', 7);
6
immature and does not show good ethics.
Never do it unless it's an emergency.
7
8
9.
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
10
11
12
help me define it properly.
13
14
return 0;
}
15
Instructions:
16
17
1. In the code editor, you are provided
with a main() code with multiple calls
18 - void sendApology(char letter, int n) {
19
// TODO: Implement the function definition
to a function which is already declared
but not yet defined called,
sendApology().
20
21 }
2. Your task is to define the
sendApology() function with the
following details:
1. Return type - void
Transcribed Image Text:main.c < > + C 5. My Sincere Apologies 1 #include<stdio.h> by CodeChum Admin 2 3 void sendApology(char, int); Okay, I don't know what got into me but that 4 was childish! Spamming someone is 5. int main(void) { sendApology('s', 2); sendApology('f', 10); sendApology('b', 3); sendApology('o', 5); sendApology('r', 12); sendApology('m', 5); sendApology('v', 2); sendApology('y', 7); 6 immature and does not show good ethics. Never do it unless it's an emergency. 7 8 9. 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 10 11 12 help me define it properly. 13 14 return 0; } 15 Instructions: 16 17 1. In the code editor, you are provided with a main() code with multiple calls 18 - void sendApology(char letter, int n) { 19 // TODO: Implement the function definition to a function which is already declared but not yet defined called, sendApology(). 20 21 } 2. Your task is to define the sendApology() function with the following details: 1. Return type - void
sendApology().
main.c
< >
+
2. Your task is to define the
1
#include<stdio.h>
sendApology() function with the
following details:
1. Return type - void
2. Function name - sendApology
2
3
void sendApology(char, int);
4
5- int main(void) {
6.
sendApology('s', 2);
sendApology('f', 10);
sendApology('b', 3);
sendApology('o', 5);
12);
3. Parameters - a character and an
7
integer.
8
3. The sendApology() function will first
check if the character passed is either
9.
sendApology('r'
sendApology('m', 5);
sendApology('v', 2);
sendApology('y', 7);
10
's', 'o', 'r', or 'y'. If it is, print it based on
11
the passed integer number of times.
12
For example, if the passed integer is 5,
13
14
then you need to print the character 5
times. Otherwise, just ignore it (i.e.
don't do anything).
return 0;
}
15
16
17
4. Do not edit the main() code.
18 - void sendApology(char letter, int n) {
19
// TODO: Implement the function definition
20
Output
21 }
sooorrrrrrrrryyyyy
Transcribed Image Text:sendApology(). main.c < > + 2. Your task is to define the 1 #include<stdio.h> sendApology() function with the following details: 1. Return type - void 2. Function name - sendApology 2 3 void sendApology(char, int); 4 5- int main(void) { 6. sendApology('s', 2); sendApology('f', 10); sendApology('b', 3); sendApology('o', 5); 12); 3. Parameters - a character and an 7 integer. 8 3. The sendApology() function will first check if the character passed is either 9. sendApology('r' sendApology('m', 5); sendApology('v', 2); sendApology('y', 7); 10 's', 'o', 'r', or 'y'. If it is, print it based on 11 the passed integer number of times. 12 For example, if the passed integer is 5, 13 14 then you need to print the character 5 times. Otherwise, just ignore it (i.e. don't do anything). return 0; } 15 16 17 4. Do not edit the main() code. 18 - void sendApology(char letter, int n) { 19 // TODO: Implement the function definition 20 Output 21 } sooorrrrrrrrryyyyy
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Ethical and Legal Issues
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education