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)
#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;
}
Comments
Leave a comment