CS602 1 Solution 2024
CS602 1 Solution 2024
#include <iostream>
#include <graphics.h>
int main() {
// Draw student ID
settextstyle(BOLD_FONT, HORIZ_DIR, 2);
drawYAxisLabels();
outtextxy(250, 10, (char*)"BC170201473");
// Draw bars
drawBar(200, 400, marksA * 3, RED); // Subject A
drawBar(300, 400, marksB * 3, GREEN); // Subject B
drawBar(400, 400, marksC * 3, BLUE); // Subject C
getch();
closegraph();
return 0;
}