Question
C programming The text file I made is named Lab1.txt and I made an empty textfile named output.text. The pathname of the Lab1.txt is C:UserspssDocumentsgeorgeSJSUEngr
C programming
The text file I made is named Lab1.txt and I made an empty textfile named output.text. The pathname of the Lab1.txt is C:UserspssDocumentsgeorgeSJSUEngr 606Lab2.The pic above shows how exactly she need the output to be in the console. So it has to be exactly like that. Pls read the question carefully. I found some answers to this question in Chegg which was not working properly. Some says no such file directory or permission denied. I hope the files names given in the answer is the same as my file names. Once the program works, if we change the numbers in the Lab1.txt., the next time I run it the numbers in the output has to change too.
I can provide the copyble file
STUDENT NAME STUDENT NO. SUBJECT A SUBJECT B
JOAN 1 70.5 85
TANIA 2 49 75
TOM 3 53 54
JEFF 4 80 49.5
SUSAN 5 89 90
KATHY 6 99 55 RAYMOND 7 22.5 75
Seven students are enrolled in a program at the end of which they must take exams in two different subjects. They receive a diploma if they pass both subjects. The passing score in each subject is 50 or higher, and the scores are: STUDENT NAME JOAN TANIA JEFF SUSAN KATHY RAYMOND STUDENT NO. SUBJECT A SUBJECT B 70.5 49 53 80 89 85 75 54 49.5 90 4 22.5 75 The above information should be saved in a data file that you need to create with the exact above format. Write a C program to read the above information from this data file and do the following steps: a) Calculate who obtained the diploma (Identity names, grades) b) Arrange subject A in ascending order (you should identify student name, student ID and subject B). c) Calculate the average and standard deviation of each subject. d) The above given data should be read from an external file. The data should be saved in the format shown in the example below and should be displayed once you run the program. Also, your output should be displayed on the screen as well as copied to an external file e) Your program should have an easy to use interface. Note: Your program should be properly commented, and you need to have a typed-up cover page, indicating Course, Program No., Your Name, and the actual date submitted YOUR PROGRAM SHOULD CONTAIN PROGRAMMING MODULES (FUNCTIONS) You can use C running on your laptop or use one of the University machines. Whichever machine you use, you should be able to demo it to me using a laptop. Please enter input file name: labl.txt Labl.txt STUDENT NAME JOAN TANIA TOM JEFF SUSAN KATHY RAYMOND SUBJECT A 70.5 49 53 80 89 STUDENT NO SUBJECT B 85 75 54 49.5 90 4 22.5 75 Please enter a command (enter h for help):h a/1 to obtain all the students that got diploma b/2 to arrange subject A in ascending order c/3 to calculate the average and standard deviation d/4 to save all the above results in an output file e to exit Please enter a command (enter h for help):1 All the students that diploma STUDENT NAME JOAN SUBJECTA 70.5 SUBJECT B 85 Please enter a command (enter h for help):2 Subject A in ascending order STUDENT NAME RAYMOND SUBJECT A 22.5 SUBJECT B 75 *All students must follow the format shown above for the sake of uniformity and ease of use. Each command that you enter, the result should be echoed to the screen with the above format as well as save in an output data fileStep 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