-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlifo.h
40 lines (34 loc) · 789 Bytes
/
lifo.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// LIFO //
#pragma once
#include "main.h"
#include <iostream>
using namespace std;
void lifo()
{
do
{
for (int i = arr.size() - 1; i >= 0;)
{
if (clocker >= arr[i].ti)
{
if (arr[i].tf == 0)
{
if (i == 0)
arr[i].tf = arr[i].t + arr[i].ti;
else
arr[i].tf = clocker + arr[i].t;
clocker = arr[i].tf;
i = arr.size() - 1;
}
else
i--;
}
else
i--;
}
clocker++;
} while (todavia_ceros());
clocker--;
cout << " Clock Final: " << clocker << endl;
clocker = 0;
}