#include <iostream>
#include <graphics.h>
using namespace std;
void drawBar(int x, int y, int height, char label) {
setfillstyle(SOLID_FILL, LIGHTGREEN);
bar(x, y, x + 50, y - height);
setcolor(BLACK);
rectangle(x, y, x + 50, y - height);
outtextxy(x + 25, y + 10, &label);
}
int main() {
int gd = DETECT, gm;
initgraph(&gd, &gm, "");
// Display student ID
outtextxy(50, 30, "Student ID: 123456");
// Prompt user to input marks for three subjects
int marksA, marksB, marksC;
cout << "Enter marks for Subject A: ";
cin >> marksA;
cout << "Enter marks for Subject B: ";
cin >> marksB;
cout << "Enter marks for Subject C: ";
cin >> marksC;
// Draw bars for each subject
drawBar(150, 400, marksA * 2, 'A');
drawBar(250, 400, marksB * 2, 'B');
drawBar(350, 400, marksC * 2, 'C');
getch();
closegraph();
return 0;
}