Question
Help in C Language. Create and display a histogram using the values in a file 1) Prompt the user for a filename, if the file
Help in C Language.
Create and display a histogram using the values in a file 1) Prompt the user for a filename, if the file does not exist your code should output "could not open file" and then exit 2) Open that file and read the integers from the file (each integer will be between 0 and 9, inclusive), if a value that is not between 0 and 9 is encountered your code should output "incorrect value" and then exit 3) we want to count how many times each of the values between 0 and 9 appears in the file 4) then display the total number of values read from the file, and how many times each particular value was in the file
#include
int main() {
/* Type your code here. */
return 0; }
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