Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You have 3 parallel arrays, 2 of which will be to read in, with up to 25 elements each. The first is an integer, the
You have 3 parallel arrays, 2 of which will be to read in, with up to 25 elements each. The first is an integer, the second is a double, and the third is a character. Each read will read in a pair of values, see below. The last read will have a 0 0 with some whitespace between. NO global variables can be used. Write a function to read this input data and call it READ_DATA. The READ_DATA function only does the read of data and returns the number of elements read in function name. Call your program "username EXAM3.c". Write another function (not a one liner) called SEARCH_DATA with the following parameters (there will be NO printed output in this function): the 3 arrays number of elements in the arrays number of search to find error, not found in array (in function name) Write a main program that inputs the following into the first 2 arrays: 12 123.45 2 234.1 98 98.1234 67 12345.0 45 6765.123 66 1.12345 0 0 (not included in input routines) Next read in an integer, one at a time, and call your function above (SEARCH_DATA) to find it or not find it, zero ends the input, t search function will be updating the third parallel array from an 'N' to a Y, if found: 98 44 66 2 0 (not included in input routines) print your output in your main function, as follows: Your output will be: Yourname CSCI1110 Input Number: Number Found? 99 9999999.9999999 YES Remember to include comments, proper indentation, variable names, etc. as discussed in class. SAMPLE OUTPUT: 2 234.1000 YES 66 NO
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started