Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

use C++ and please show me the output and code For this lab you need to write a program to read in the data and

image text in transcribeduse C++ and please show me the output and code

For this lab you need to write a program to read in the data and store them into a 2-dimentional array, and use 1 function print the answers given by each student and use another function to analyze the answers. (If you don't remember how to read data from a file, see Lab #7 instruction.) The data file is in the file called exam.txt. It is provided to you and you need to copy it to wormulon You should begin by opening the file with nano or another text editor and examining the format note that it contains the students' ids and answers to 10 questions for each of the students In the mainfunction *Read in the data from exam.txt and store the data to a 2-dimentional array ? Ask user to enter the correct answers (For example: A B D C D A C D B B), store the correct answers into another array Pass the 2-dimentional array to a function to print the student ids and their 10 answers Pass the 2-dimentional array, and the array holding correct answers to a function In the function for printing students' ids and answers: *Print each student ID, and followed by 10 answers For example Studentl A B D C DA C D B B Student2 A BC C DA C A B B Student3 A B D C D A C D C B In the function for grading the answers: Grade each student's answers by using the correct answers enter by the user, and print the score for each student. Keep track of the highest score, print it at the end Keep track of the lowest score, print it at the end Calculate the average score, print it at the end * Sample output Studentl score is 10 Student2 score is 8 Student3 score is 9 the average score is 7.8 highest score is 10 Lowest score is 3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mastering Big Data Interview 751 Comprehensive Questions And Expert Answers

Authors: Mr Bhanu Pratap Mahato

1st Edition

B0CLNT3NVD, 979-8865047216

More Books

Students also viewed these Databases questions