Write a C Program using Concepts of Arrays and string functions. Create a code that satisty the given problem and sample output. Thank You! 1. Ask the user to input an n number of arrays and the program should be able to do the following functions: a) Find an average of an input array b) Find the highest value from the input array c) Search for a particular number from the input array (should give the index or indices if there are more than

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 6RQ
icon
Related questions
Question

Write a C Program using Concepts of Arrays and string functions. Create a code that satisty the given problem and sample output. Thank You!

1. Ask the user to input an n number of arrays and the program should be able to do the following functions:
a) Find an average of an input array
b) Find the highest value from the input array
c) Search for a particular number from the input array (should give the index or indices if there are more than 1)

SAMPLE OUTPUT:
Input array size: 8
Enter value for each element
Element 0: 1
Element 1: 3
Element 2: 5
Element 3: 4
Element 4: 7
Element 5: 4
Element 6: 6
Element 7: 4
Your array is = { 1 3 5 4 7 4 6 4 }
what do you want to do?
(1)Find the aver age
(2)Find the highest number
3)Find a number
OSExit:
1
The average is 4.250000
Press any key to continue...
Your array is = { 1 3 5 4 7 4 6 4 }
what do you want to do?
(1)Find the aver age
(2)Find the highest number
(3)Find a number
OjExit:
The highest number is 7
Press any key to continue...
Your array is = { 1 3 5 4 7 4 6 4 }
what do you want to do?
(1)Find the aver age
(2)Find the highest number
(3)Find a number
(O)Exit:
Enter a number you want to search: 4
The number 4 can be found at element/s: 3 5 7
Press any key to continue...
Your array is = { 1 3 5 4 7 4 6 4 }
what do you want to do?
(1)Find the aver age
(2)Find the highest number
(3)Find a number
(OSExit:
Transcribed Image Text:SAMPLE OUTPUT: Input array size: 8 Enter value for each element Element 0: 1 Element 1: 3 Element 2: 5 Element 3: 4 Element 4: 7 Element 5: 4 Element 6: 6 Element 7: 4 Your array is = { 1 3 5 4 7 4 6 4 } what do you want to do? (1)Find the aver age (2)Find the highest number 3)Find a number OSExit: 1 The average is 4.250000 Press any key to continue... Your array is = { 1 3 5 4 7 4 6 4 } what do you want to do? (1)Find the aver age (2)Find the highest number (3)Find a number OjExit: The highest number is 7 Press any key to continue... Your array is = { 1 3 5 4 7 4 6 4 } what do you want to do? (1)Find the aver age (2)Find the highest number (3)Find a number (O)Exit: Enter a number you want to search: 4 The number 4 can be found at element/s: 3 5 7 Press any key to continue... Your array is = { 1 3 5 4 7 4 6 4 } what do you want to do? (1)Find the aver age (2)Find the highest number (3)Find a number (OSExit:
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Arrays
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
Recommended textbooks for you
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
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 with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning