Question
? ?#1: I cannot get the file to open properly in the program. I opened the Lab8.dat with word so it was converted to text.
?
?#1: I cannot get the file to open properly in the program. I opened the Lab8.dat with word so it was converted to text. I'm not sure I was supposed to do this but I did not know how else I would download the file. I used and if to check whether or not the file opened properly and it is not working.
?#2: I am not sure how to call a function(other than main) to read the values from this file.
#3: In paragraph two it says that the function should "accept the array, number of values and whole number" but, how can the function accept the array when the function is supposed to tread the values into the array?
?Thank you so much! Have a nice day!
Goals: Practicing arrays and functions into an array using a function other than main. The number of values in the file is less than 300 and all the values are whole Create a program that will read values from a file called Lab8.dat (posted on Canvas) and store it numbers. The actual number of values stored in the file should be returned to the function call Your program should contain another function that accepts the array, the number of values in the array, and a whole number array are evenly divisible by the whole number and return this count to the function call The loop should not contain more than 3 arithmetic operators ++ and + count as arithmetic operators, but = does not). ount how many values in the s function should use a loop to c The main function should call the function to read the data from the file. Next, ask the user to enter a whole number between 2 and 20 (you may assume the user enters a correct value). This whole number is the value to divide each element in the array. Next, call the function to how many values in the file are eveniy divisible by the entered whole number and output the returned count. The message should be something like 35 of the 189 values in the file were evenly divisible by 12 with the underlined values replaced by the your calculated values and the user's input
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