Answer to Question #224663 in C++ for Penwell

Question #224663

Write a program to find owing students in each semester for BIT and IT, implemented as an array of students records. The student record has the following fields: -nine digits student ID number, -student name, -student surname, - program registered for, -semester registered for. Assume that the above data is read from a line of a text file - "STDTA.txt". Your program should display the information of all students BIT and IT who have paid less than £1900.00, the total owed by the students, and it should also display the count of owing student in each program (BIT and IT)



1
Expert's answer
2021-08-10T04:28:05-0400
#include <iostream>
#include <fstream>
using namespace std;
int main() {
	fstream my_file;
	my_file.open("my_file.txt", ios::in);
	if (!my_file) {
		cout << "No such file";
	}
	else {
		char ch;

		while (1) {
			my_file >> ch;
			if (my_file.eof())
				break;

			cout << ch;
		}

	}
	my_file.close();
	return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS