# [ A student who needs help ]

This is a discussion on [ A student who needs help ] within the C Programming forums, part of the General Programming Boards category; we have this requirement in school that we have to create a program that will able to solve the cpu ...

1. ## [ A student who needs help ]

we have this requirement in school that we have to create a program that will able to solve the cpu scheduling (first come first serve, 1st job done and we need it to gant chart it). please teach me how to create a simple chart...

it suppose to be like:

Process Burst time Arrival time
A 5 1
B 6 2
C 10 3

and that chart should be like:

___________0___5___6_____10_______________________ ______
A ] //////
B ] //////
C ] //////////

the faded will skip the previous time and should only be in the current time,
like in C, 6-10...... and i need it in C++

2. I Repost it sorry

it suppose to be like:

Process ____________________Burst time________________ Arrival time
A _________________________ 5_______________________1
B _________________________ 6 ______________________ 2
C _________________________10 _____________________ 3

and that chart should be like:

___________0___5___6_____10_______________________ ______
A ] ___//////
B ] _______//////
C ] ___________ //////////

the faded will skip the previous time and should only be in the current time,
like in C, 6-10...... and i need it in C++

in the chart _ (underscroll) should be black or empty space

3. Well, first of all, if you need this in C++, it should be in the C++ section of the forums, so a moderator will probably move it over.

But as to your question, draw the chart one line at a time. You have the numbers, so it's easy to tell where to put everything. First line is the nice line consisting of '_' (or ' ') chars and the numbers. Draw that line one char at a time in a loop, and then put the numbers where they need to go.

As for the processes, it should be pretty easy to draw the necessary '/' chars depending upon the numbers. Again, do them char by char.

How's that for a start?