Project In ITE-103
Submitted by:
John Mark V. Suerto
Submitted to:
Kevin V. Cebedo
#include <iostream>
#include <fstream>
#include <string.h>
using namespace std;
main ()
ofstream file;
[Link] ("[Link]");
if (file.is_open())
string IDnum,LastName,FirstName,MiddleInitial,Course,Year;
cout << "Enter student's ID number: " <<endl;
cin >> IDnum;
cout << "Enter student's last name: " <<endl;
cin >> LastName;
cout << "Enter student's first name: " <<endl;
cin >> FirstName;
cout << "Enter student's middle initial: "<<endl;
cin >> MiddleInitial;
cout << "Enter student's course: "<<endl;
cin >> Course;
cout << "Enter student's college year: "<<endl;
cin >> Year;
file << IDnum << "\t" << LastName << "\t" << FirstName << "\t" <<
MiddleInitial << "\t" << Course << "\t" << Year<<endl;
string option;
cout << "1. Add student info: " <<endl;
cout << "2. Exit program " <<endl;
cin >> option;
if(option == "1")
string var = "Y";
cout << "Continue? Y/N: " <<endl;
cin >> var;
while(var == "Y" || var == "y")
string IDnum,LastName,FirstName,MiddleInitial,Course,Year;
cout << "Enter student's ID number: " <<endl;
cin >> IDnum;
cout << "Enter student's last name: " <<endl;
cin >> LastName;
cout << "Enter student's first name: " <<endl;
cin >> FirstName;
cout << "Enter student's middle initial: "<<endl;
cin >> MiddleInitial;
cout << "Enter student's course: "<<endl;
cin >> Course;
cout << "Enter student's college year: "<<endl;
cin >> Year;
file << IDnum << "\t" << LastName << "\t" << FirstName << "\t"
<< MiddleInitial << "\t" << Course << "\t" << Year<<endl;
cout << "Do you want to add another student's info? "<<endl;
cin >> var;
[Link]();
system("pause");