hello! can you please help me with my code? i need to get the same expected output. the instructions are on the photo as well as the expected output here's my code: #include void cheerUp(double*, double*); int main(void) {     double engagement_1, engagement_2;     printf("Enter engagement level #1: ");     scanf("%lf", &engagement_1);     printf("Enter engagement level #2: ");     scanf("%lf", &engagement_2);     cheerUp(&engagement_1, &engagement_2);     printf("\n");

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 31SA
icon
Related questions
Question

hello! can you please help me with my code? i need to get the same expected output. the instructions are on the photo as well as the expected output


here's my code:

#include<stdio.h>

void cheerUp(double*, double*);

int main(void) {
    double engagement_1, engagement_2;

    printf("Enter engagement level #1: ");
    scanf("%lf", &engagement_1);

    printf("Enter engagement level #2: ");
    scanf("%lf", &engagement_2);

    cheerUp(&engagement_1, &engagement_2);

    printf("\n");

    printf("Updated engagement level #1: %.2lf\n", engagement_1);
    printf("Updated engagement level #2: %.2lf", engagement_2);

    return 0;
}

void cheerUp(double *engagement_1, double *engagement_2) {
    // TODO: Implement the function definition
}A

Instructions:
1. 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().
2. 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.
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
Transcribed Image Text:Instructions: 1. 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(). 2. 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. 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
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Function Arguments
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
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,