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

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

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.
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