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++
Please Help Thanks
and one more thing, im using do while statement w/ switch on it
its like
Expand|Select|Wrap|Line Numbers
- int main()
- {
- int j1, j2, j3, time, arrival;
- char answer;
- /* Third Screen - CPU SCHEDULING ! */
- do
- {
- clrscr();
- printf("\n\n\n Cpu Scheduling");
- printf("\n\n First Come First Serve");
- printf("\n\n\n\n\n Enter the following 1st Burst time: ");
- s("%d", &j1);
- clrscr();
- printf("\n\n\n Cpu Scheduling");
- printf("\n\n First Come First Serve");
- printf("\n\n\n\n\n Enter the following 2nd Burst time: ");
- s("%d", &j2);
- clrscr();
- printf("\n\n\n Cpu Scheduling");
- printf("\n\n First Come First Serve");
- printf("\n\n\n\n\n Enter the following 3rd Burst time: ");
- s("%d", &j3);
- clrscr();
- printf("\n\n\n Cpu Scheduling");
- printf("\n\n First Come First Serve");
- printf("\n\n\n\n\n Enter the following Arrival time: ");
- s("%d", &time);
- printf("\n\n\n\n Process Burst Time TimeArrival Time");
- printf("\n\n J01 %d %d ", j1,time);
- printf("\n\n J02 %d %d ", j2,arrival=time+1);
- printf("\n\n J03 %d %d ", j3,arrival=arrival+1);
- p("\n\n\n\n\n\n Response Gant Chart ");
- p("\n\n\n Do you want to try it again? [ Y / N ]: " );
- s("%c", &answer);
- }
- while (answer == 'y' );
- getche();
- }
my prob are
1. i cant make it go back to DO when i enter y....
2. how can i make a chart
3. is it possible that it can accept small y and capital Y, how?
4. and how can i make not to accept other letters or special char rather than
y, Y, n and N...?
PLEASE HELP thanks