• This program inserts 10 floating point values into an array using for loop, the start value for the array must be read from the user, and the increment between each two values is 1.20 1. Prints out the second, fourth, sixth, eighth and tenth members of the array using pointers to access the members of the array. 2. then print and sum of the first, third, fifth, seventh, and ninth using pointers to access the members of the array. #include int main() { float a[10]; float *p; float sum=0; float t; printf("Enter Number to start with: "); scanf("%f",&t); } for(int i=0; i<10; i++) { a[i] = t; t+=1.20; } // print second, fourth, sixth, eighth and tenth members // print the first, third, fifth, seventh, and ninth members // print the sum of the first, third, fifth, seventh, and ninth members

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section: Chapter Questions
Problem 6PP: (Numerical) a. Define an array with a maximum of 20 integer values, and fill the array with numbers...
icon
Related questions
Question

can you help me to solve this problem?

%^•
●
то
This program inserts 10 floating point values into an array using for loop, the start
value for the array must be read from the user, and the increment between each two
values is 1.20
1. Prints out the second, fourth, sixth, eighth and tenth members of the array using
pointers to access the members of the array.
2. then print and sum of the first, third, fifth, seventh, and ninth using pointers to
access the members of the array.
#include<stdio.h>
int main() {
float a [10];
float *p;
float sum=0;
float t;
printf("Enter Number to start with: ");
scanf("%f",&t);
for(int i=0; i<10; i++) {
a[i] = t;
t+=1.20; }
// print second, fourth, sixth, eighth and tenth members
// print the first, third, fifth, seventh, and ninth members
// print the sum of the first, third, fifth, seventh, and ninth
members
الخميس ٢٧ أكتوبر
+ :
2
11:1
Transcribed Image Text:%^• ● то This program inserts 10 floating point values into an array using for loop, the start value for the array must be read from the user, and the increment between each two values is 1.20 1. Prints out the second, fourth, sixth, eighth and tenth members of the array using pointers to access the members of the array. 2. then print and sum of the first, third, fifth, seventh, and ninth using pointers to access the members of the array. #include<stdio.h> int main() { float a [10]; float *p; float sum=0; float t; printf("Enter Number to start with: "); scanf("%f",&t); for(int i=0; i<10; i++) { a[i] = t; t+=1.20; } // print second, fourth, sixth, eighth and tenth members // print the first, third, fifth, seventh, and ninth members // print the sum of the first, third, fifth, seventh, and ninth members الخميس ٢٧ أكتوبر + : 2 11:1
٪۹۰
Order
Array Value
index
T
The output must be in this format: (You can use any starting value)
Enter Number to start with: 5.00
This is number (2): 6.20
This is number (4): 8.60
This is number (6): 11.00
This is number (8): 13.40
This is number (10): 15.80
this is number (1): 5.00
this is number (3) : 7.40
this is number (5): 9.80
this is number (7): 12.20
this is number (9): 14.60
Sum is 49.00
Pictorial Presentation:
first
5.00
0
second third fourth fifth
6.20 7.40
9.80
4
8.60
3
1
2
sixth seventh eighth | ninth
11.00 12.20 13.40 14.60
5
6
7
8
tenth
15.80
9
الخميس ٢٧ أكتوبر م
+ :
:00
<
2
1
2
Transcribed Image Text:٪۹۰ Order Array Value index T The output must be in this format: (You can use any starting value) Enter Number to start with: 5.00 This is number (2): 6.20 This is number (4): 8.60 This is number (6): 11.00 This is number (8): 13.40 This is number (10): 15.80 this is number (1): 5.00 this is number (3) : 7.40 this is number (5): 9.80 this is number (7): 12.20 this is number (9): 14.60 Sum is 49.00 Pictorial Presentation: first 5.00 0 second third fourth fifth 6.20 7.40 9.80 4 8.60 3 1 2 sixth seventh eighth | ninth 11.00 12.20 13.40 14.60 5 6 7 8 tenth 15.80 9 الخميس ٢٧ أكتوبر م + : :00 < 2 1 2
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Array
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++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
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
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,