#include <iostream>
using namespace std;
int main() {
int emp = 2;
int days = 10;
int empAttend[emp][days];
while (true) {
cout << "\nAttendance System Menu:\n";
cout << "1. Mark Attendance\n";
cout << "2. Generate Attendance Report\n";
cout << "3. Exit\n";
cout << "Enter your choice: ";
int choice;
cin >> choice;
switch (choice) {
case 1:
for (int i = 0; i < emp; i++) {
cout << "Enter attendance for Employee " << i + 1 << " (1 for
present, 0 for absent) for each day:\n";
for (int j = 0; j < days; j++) {
cout << "Day " << j + 1 << ": ";
cin >> empAttend[i][j];
}
}
cout << "Attendance marked successfully.\n";
break;
case 2:
cout << "Attendance Report:\n";
cout << "Employee";
for (int j = 0; j < days; j++) {
cout << "Day " << j + 1;
}
cout << "Total\n";
for (int i = 0; i < emp; i++) {
int AttendTotal = 0;
cout << "Employee " << i + 1<<": ";
for (int j = 0; j < days; j++) {
cout << empAttend[i][j];
AttendTotal += empAttend[i][j];
}
cout << ": "<<AttendTotal << "\n";
}
break;
case 3:
cout << "Exiting the program.\n";
return 0;
default:
cout << "Invalid choice. Please try again.\n";
}
}
return 0;
}