Question
1) Write a program that will ask for the user to input a filename of a text file that contains an unknown number of integers.
1) Write a program that will ask for the user to input a filename of a text file that contains an unknown number of integers. And also an output filename to display results. You will read all of the integers from the input file, and store them in an array. (You may need to read all the values in the file once just to get the total count) Using this array you will find the max number, min number, average value, and standard deviation. These results will be reported to both the screen and placed into the output file that the user choose. Output to screen and file could look like this: Read from file: 12 values Maximum value = 20 Minimum value = 3 Average value = 13.34 Standard Deviation = 2.15 You can create a simple NotePad file to store a bunch of integers, just make sure that there is at least a space or a line between each number. 2) Write a program that does basic encrypting of text. You will ask the user the filename of a text file which contains a few sentences of text. You will read this text file one character at a time, and change each letter to another one and write out to an output file. The conversion should be done a -> b, b->c , z->a, A->B, B->C, . Z->A. This means just shift each letter by one, but Z goes back to A. Example: Hello converts to Ifmmp All other punctuation and spaces or symbols can stay as they are. If you have time you could write the reverse program that would take your encrypted file as the input and get back the original
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