The program will take the input from the user for the course name and obtain marks. After taking the 6 inputs the program will draw a bar chart by labeling the bars of the bar chart according to the subject name.
The title bar of the graphic window must show your student ID.
What I have tried:
#include <graphics.h>
#include <conio.h>
#include <iostream>
using namespace std;
int main()
{
string Subject1, Subject2, Subject3;
int number1, number2, number3;
cout<<"Enter the First Subject::";
cin>>Subject1;
cout<<"Enter the Number of Subject::";
cin>>number1;
cout<<"Enter the Second Subject::";
cin>>Subject2;
cout<<"Enter the Number of Subject::";
cin>>number2;
cout<<"Enter the Third Subject::";
cin>>Subject3;
cout<<"Enter the Number of Subject::";
cin>>number3;
int gd = DETECT, gm;
initgraph ("&gd, "&gm, "X:\\TC\\BGI);
settextstyle(BOLD_FONT,HORIZ_DIR,2);
outtextxy(275,0,"Bc--------");
//here add your student id
setlinestyle(SOLID_LINE,0,2);
/*Draw on X and on Y Axis*/
line (90,400,90,50);
line(580,400,90,400);
outtextxy(65,25,"Marks");
outtextxy(40,70,"100-");
outtextxy(595,385,"Subjects");
/*Draw bars on screen*/
setfillstyle(SOLID_FILL,GREEN);
bar3d(150,150,200,400,15,1);
bar3d(300,120,350,400,15,1);
bar3d(450,135,500,400,15,1);
getch();
closegraph();
return 0;
}