(C PROGRAMMING ONLY) 3. Entertaining the Bored by CodeChum Admin We're now in the middle of our tour but I see these two guys getting bored. I see that their level of engagement is getting low.   Luckily, I remember that I'm good at cheering up. Oh wait, the last time I cheered someone up was a long time ago. Please help me learn how to cheer people up again.     Instructions: In the code editor, you are provided with the main() function that asks the user for 2 double numbers which represents the engagement levels of the two bored guys and the passes the address of those 2 double numbers to the function call for the function, cheerUp(). Your task is to implement the function definition of the cheerUp() function. The cheerUp() function should update the values passed by multiplying each of them by 3. Do not edit anything in the main() function. Input 1. First Engagement Level 2. Second Engagement Level

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

(C PROGRAMMING ONLY)

3. Entertaining the Bored
by CodeChum Admin

We're now in the middle of our tour but I see these two guys getting bored. I see that their level of engagement is getting low.

 

Luckily, I remember that I'm good at cheering up. Oh wait, the last time I cheered someone up was a long time ago. Please help me learn how to cheer people up again.

 

 

Instructions:

In the code editor, you are provided with the main() function that asks the user for 2 double numbers which represents the engagement levels of the two bored guys and the passes the address of those 2 double numbers to the function call for the function, cheerUp().
Your task is to implement the function definition of the cheerUp() function. The cheerUp() function should update the values passed by multiplying each of them by 3.
Do not edit anything in the main() function.
Input

1. First Engagement Level

2. Second Engagement Level

Output

Enter engagement level #1: 42.31
Enter engagement level #2: 20

Updated engagement level #1: 126.93
Updated engagement level #2: 60.00

main.c
< > +c
1
#include<stdio.h>
2
3
void cheerUp(double*, double*);
4
5- int main(void) {
double engagement_1, engagement_2;
printf("Enter engagement level #1: ");
scanf("%lf", &engagement_1);
8
9.
10
printf("Enter engagement level #2: ");
scanf("%lf", &engagement_2);
11
12
13
14
cheerUp(&engagement_1, &engagement_2);
15
16
printf("\n");
17
printf("Updated engagement level #1: %.21f\n", engagement_1);
printf("Updated engagement level #2: %.2lf", engagement_2);
18
19
20
21
return 0;
22 }
Transcribed Image Text:main.c < > +c 1 #include<stdio.h> 2 3 void cheerUp(double*, double*); 4 5- int main(void) { double engagement_1, engagement_2; printf("Enter engagement level #1: "); scanf("%lf", &engagement_1); 8 9. 10 printf("Enter engagement level #2: "); scanf("%lf", &engagement_2); 11 12 13 14 cheerUp(&engagement_1, &engagement_2); 15 16 printf("\n"); 17 printf("Updated engagement level #1: %.21f\n", engagement_1); printf("Updated engagement level #2: %.2lf", engagement_2); 18 19 20 21 return 0; 22 }
1. First Engagement Level
2. Second Engagement Level
Output
Enter engagement level #1: 42.31
Enter engagement level #2: 20
Updated engagement level #1: 126.93
Updated engagement level #2: 60.00
Transcribed Image Text:1. First Engagement Level 2. Second Engagement Level Output Enter engagement level #1: 42.31 Enter engagement level #2: 20 Updated engagement level #1: 126.93 Updated engagement level #2: 60.00
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Fundamentals of Boolean Algebra and Digital Logics
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.
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