3. Write a C++ program that prompts the user to enter a file name that contains the total mark of students. Each line in the input file contains a student name followed by the student's total mark....


num 3 in c++


3. Write a C++ program that prompts the user to enter a file name that contains<br>the total mark of students. Each line in the input file contains a student name<br>followed by the student's total mark. The program should ask the user for<br>the passing threshold (i.e. student whose total mark is greater than or equal<br>the threshold will pass the course) and copy the students who pass the course<br>to a new file (the name of the output file is specified by the user). Moreover,<br>the output file should be format so that all the marks are displayed with two<br>digits after the decimal point. The width for the names and marks fields<br>should be eight and seven, respectively. A sample input and output files are<br>shown below (the passing mark in this sample is assumed to be 60).<br>pass.txt (sample)<br>Ahlam<br>total.txt (sample)<br>Ahlam 80.123<br>80.12<br>Bader 83.1<br>Bader 83.10<br>Nabil 91.25<br>Nabil<br>91.25<br>Khoula 70<br>Khoula<br>70.00<br>Saif 55.333<br>Saif<br>65.33<br>Salem 50<br>Sultan<br>92.50<br>Sultan 92.5<br>Qais 77.20<br>Qais 77.2<br>

Extracted text: 3. Write a C++ program that prompts the user to enter a file name that contains the total mark of students. Each line in the input file contains a student name followed by the student's total mark. The program should ask the user for the passing threshold (i.e. student whose total mark is greater than or equal the threshold will pass the course) and copy the students who pass the course to a new file (the name of the output file is specified by the user). Moreover, the output file should be format so that all the marks are displayed with two digits after the decimal point. The width for the names and marks fields should be eight and seven, respectively. A sample input and output files are shown below (the passing mark in this sample is assumed to be 60). pass.txt (sample) Ahlam total.txt (sample) Ahlam 80.123 80.12 Bader 83.1 Bader 83.10 Nabil 91.25 Nabil 91.25 Khoula 70 Khoula 70.00 Saif 55.333 Saif 65.33 Salem 50 Sultan 92.50 Sultan 92.5 Qais 77.20 Qais 77.2

Jun 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here