fork download
  1.  
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. int main() {
  6. // Step 1 - Student Information
  7. cout << "Student Name: Iqra Bibi" << endl;
  8. cout << "Student ID: BC260440938" << endl;
  9. cout << "----------------------------------------" << endl;
  10. cout << "University IT Helpdesk Report" << endl;
  11. cout << "----------------------------------------" << endl;
  12.  
  13. // Step 2 - Digit Extraction
  14. // ID ka numeric part: 260440938
  15. // Sirf / aur % se digits nikalay hain
  16. long long idNum = 260440938;
  17.  
  18. int d1 = (idNum / 10000000) % 10; // 2nd digit = 6
  19. int d2 = (idNum / 100000) % 10; // 4th digit = 4
  20. int d3 = (idNum / 1000) % 10; // 6th digit = 0
  21. int d4 = (idNum / 10) % 10; // 8th digit = 3
  22. int d5 = idNum % 10; // last digit = 8
  23.  
  24. cout << "Extracted Digits: " << d1 << ", " << d2 << ", " << d3 << ", " << d4 << ", " << d5 << endl;
  25. cout << endl;
  26. cout << "Desk | Total Tickets | Resolution Time | Status" << endl;
  27. cout << "----------------------------------------" << endl;
  28.  
  29. // Step 3, 4, 5 - Har desk ke liye alag alag
  30. int lightCount = 0, moderateCount = 0, heavyCount = 0;
  31. string status;
  32. int time1, time2, time3, time4, time5;
  33.  
  34. // 1. Network Support
  35. time1 = d1 * 60;
  36. if (d1 >= 7) { status = "HEAVY"; heavyCount++; }
  37. else if (d1 >= 4) { status = "MODERATE"; moderateCount++; }
  38. else { status = "LIGHT"; lightCount++; }
  39. cout << "Network Support | " << d1 << " | " << time1 << " | " << status << endl;
  40.  
  41. // 2. Computer Lab Support
  42. time2 = d2 * 60;
  43. if (d2 >= 7) { status = "HEAVY"; heavyCount++; }
  44. else if (d2 >= 4) { status = "MODERATE"; moderateCount++; }
  45. else { status = "LIGHT"; lightCount++; }
  46. cout << "Computer Lab Support | " << d2 << " | " << time2 << " | " << status << endl;
  47.  
  48. // 3. LMS Support
  49. time3 = d3 * 60;
  50. if (d3 >= 7) { status = "HEAVY"; heavyCount++; }
  51. else if (d3 >= 4) { status = "MODERATE"; moderateCount++; }
  52. else { status = "LIGHT"; lightCount++; }
  53. cout << "LMS Support | " << d3 << " | " << time3 << " | " << status << endl;
  54.  
  55. // 4. Account Support
  56. time4 = d4 * 60;
  57. if (d4 >= 7) { status = "HEAVY"; heavyCount++; }
  58. else if (d4 >= 4) { status = "MODERATE"; moderateCount++; }
  59. else { status = "LIGHT"; lightCount++; }
  60. cout << "Account Support | " << d4 << " | " << time4 << " | " << status << endl;
  61.  
  62. // 5. Hardware Support
  63. time5 = d5 * 60;
  64. if (d5 >= 7) { status = "HEAVY"; heavyCount++; }
  65. else if (d5 >= 4) { status = "MODERATE"; moderateCount++; }
  66. else { status = "LIGHT"; lightCount++; }
  67. cout << "Hardware Support | " << d5 << " | " << time5 << " | " << status << endl;
  68.  
  69. // Step 6 - Summary
  70. cout << endl;
  71. cout << "Summary:" << endl;
  72. cout << "LIGHT Desks: " << lightCount << endl;
  73. cout << "MODERATE Desks: " << moderateCount << endl;
  74. cout << "HEAVY Desks: " << heavyCount << endl;
  75.  
  76. return 0;
  77. }
  78.  
Success #stdin #stdout 0.01s 5344KB
stdin
Standard input is empty
stdout
Student Name: Iqra Bibi
Student ID: BC260440938
----------------------------------------
University IT Helpdesk Report
----------------------------------------
Extracted Digits: 6, 4, 0, 3, 8

Desk | Total Tickets | Resolution Time | Status
----------------------------------------
Network Support | 6 | 360 | MODERATE
Computer Lab Support | 4 | 240 | MODERATE
LMS Support | 0 | 0 | LIGHT
Account Support | 3 | 180 | LIGHT
Hardware Support | 8 | 480 | HEAVY

Summary:
LIGHT Desks: 2
MODERATE Desks: 2
HEAVY Desks: 1