1. In the code editor, you are provided with a main() function where the user is asked for 5 double numbers. 2. Then, in lines 19 - 23, your task is to set the addresses of these numbers to each of the pointers. The address of the first number, a, should be assigned to the first pointer, the address of the second number, b, should be assigned to the second pointer, and so on.
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>
int main(void) {
double a, b, c, d, e;
double *ptr1, *ptr2, *ptr3, *ptr4, *ptr5;
printf("Enter 1st number: ");
scanf("%lf", &a);
printf("Enter 2nd number: ");
scanf("%lf", &b);
printf("Enter 3rd number: ");
scanf("%lf", &c);
printf("Enter 4th number: ");
scanf("%lf", &d);
printf("Enter 5th number: ");
scanf("%lf", &e);
// TODO: Fill in the blanks
ptr1 = __
ptr2 = __
ptr3 = __
ptr4 = __
ptr5 = __
printf(
"%.1lf %.1lf %.1lf %.1lf %.1lf",
*ptr1, *ptr2, *ptr3, *ptr4, *ptr5
);
return 0;
}
![Instructions:
1. In the code editor, you are provided with a main() function
where the user is asked for 5 double numbers.
2. Then, in lines 19 - 23, your task is to set the addresses of
these numbers to each of the pointers. The address of the
first number, a, should be assigned to the first pointer, the
address of the second number, b, should be assigned to the
second pointer, and so on.
Input
1. First number
2. Second number
3. Third number
4. Fourth number
5. Fifth number
Output
Enter 1st number: 23.2
Enter 2nd number: 10.01
Enter 3rd number: 800
Enter 4th number: 24
Enter 5th number: 21
23.2 10.e 8ee.0 24.0 21.0](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F88a1e655-bf80-4e90-8486-f701db3f0b35%2F0bcf1896-9290-48d5-ab9a-07ac8f340c46%2Fplsunco_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 4 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)